Why the heck does my IIF Time() > #11:50:00 AM# not work??

GrandMasterTuck

In need of medication
Local time
Today, 15:03
Joined
May 4, 2013
Messages
129
[SOLVED] Why the heck does my IIF Time() > #11:50:00 AM# not work??

I don't understand why this isn't working. I have a text field that is supposed to show either the word "DAYS" or "NOONS", depending on the workstation's time. If it's BEFORE 11:50am, it's supposed to show "DAYS", and if it's after that time, it shows "NOONS". Only problem, it ALWAYS shows "NOONS", no matter what time it is. And I can't figure out why...

Here's the code:

=IIf("Time() > #11:49:59 AM#","NOONS","DAYS")

What am I doing wrong?? As far as I can tell through searches (google and here), I formatted this correctly, and it should work. But it doesn't! AAGH!

EDIT: Oh for the love of Pete... turns out I shouldn't have put quotes in the first parameter of the IIF statement. This works perfect:

=IIf(Time() > #11:49:59 AM#,"NOONS","DAYS")

Now I feel dumb. I'm leaving this here to help anyone else who's as dumb as me.
 
Last edited:
Glad you got it solved and thanks for posting back with the solution.
 

Users who are viewing this thread

Back
Top Bottom