DaveWalker
Programmer
I have a Textbox control on a form and I am trying to use the following as the Control Source:
=IIf([MyDate]=#1/1/2000#,"Happy New Year",[MyDate])
The idea is to display some text if a date matches exactly, or the date in the field if it's not a match.
Two problems I'm running into are
=IIf([MyString]="foo","yes","no" works if MyString is a text field, but not if it's a date field. (I can't seem to hit on the correct format for "foo" for dates)
=IIf([MyString],[MyString],"empty" works fine if it's a text field, but again errors if it's a date field.
Thanks for any light you can shed....
=IIf([MyDate]=#1/1/2000#,"Happy New Year",[MyDate])
The idea is to display some text if a date matches exactly, or the date in the field if it's not a match.
Two problems I'm running into are
=IIf([MyString]="foo","yes","no" works if MyString is a text field, but not if it's a date field. (I can't seem to hit on the correct format for "foo" for dates)
=IIf([MyString],[MyString],"empty" works fine if it's a text field, but again errors if it's a date field.
Thanks for any light you can shed....