Error returned

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
 
D

Duane Hookom

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top