Error returned

  • Thread starter Thread starter Deltic
  • Start date Start date
D

Deltic

I have two items running within a query and both are returning error#
rather than what i was expecting, can anyone see where im going
wrong ?

colour: IIf([HRSDown]="0","YES (Green)",IIf([HRSDown]>"0" And
[HRSDown]<="3","Yes (Amber)","No Red"))

hoursdowntext: IIf([HRSDown]="0","On Programme")

thanks
 
Is HRSDown actually a string or is it a number. You are comparing this field
to string values. If HRSDown is numeric, you should remove the quotes from
around 0 and 3.

Actually I would recommend creating a small user-defined function for this
"business logic calculation". A query is not where you should be storing your
calculations.
 
Back
Top