Change text in a Text Box based on morning or afternoon

RevJeff

Registered User.
Local time
Today, 14:12
Joined
Sep 18, 2002
Messages
129
Hi,

I have done this in the past but can't remember what I did.

I am trying to change the text in a Text Box on a form based on the time of day.

So if it is between 12:00am and 11:59:59am, I want the text box to say "Good Morning" and if it is between 12:00pm and 11:59:59pm, I want the Text Box to say "Good Afternoon".

Any help would be great!

Thanks,
Jeff
 
One way:

=IIf(Time()<= #11:59:59#, "Good morning", "Good afternoon")
 
Thanks! That did the trick.
 

Users who are viewing this thread

Back
Top Bottom