Query ifff statement with calculation?

MushroomKing

Registered User.
Local time
Yesterday, 19:43
Joined
Jun 7, 2018
Messages
100
Hi everyone!

I have a small question that im unable to find the exact solution for.
It's driving me craaaaazy :D

I have a query where I want to apply this:

actualtime: IIf([daytext]="vrijdag" Or "Friday",([timediff]-48))


Now obviously its not working...but why?

If my daytext is equal to vrijdag or Friday, I want to subtract 48 from my timediff value.


Could someone help me out with this small but annoying expression?
Thanks in advance!!!
 
You need True and False arguments I would have thought?

However try

Code:
IIf([daytext]="vrijdag" Or [daytext] = "Friday",([timediff]-48))
 
Hi Gasman! Always good to see you in the thread :)

Still doesn't work for some reason. I get an #error in my field. :confused:



(sorry, will quote with code tag next time, its corrected)
 
As Gasman said you also need a 'false' argument. For example

Code:
IIf([daytext]="vrijdag" Or [daytext] = "Friday",[timediff]-48, 1234)

Replace 1234 with whatever you want when daytext is neither of those values
 

Users who are viewing this thread

Back
Top Bottom