Hello all -
In Microsoft Access 2000, I'm building an expression in a form which I want to return 1 of 2 possible values. The relevant fields are PARC 1 Sent (a check box) and Date PARC 1 Sent.
What I want to have happen is this: if the PARC 1 Sent check box is not checked, I want the Date PARC 1 Sent to remain blank. On the other hand, if that box IS checked, I want the Date PARC 1 Sent to automatically display that day's date. I have tried many approaches - using =IIf, =IIf(IsNull, changing the check box to a Yes/No box, changing the format of the Date PARC 1 Sent in the underlying table from Date/Time to Text, removing the =Date() from the expression and replacing it with a text value (just to see if that was the problem). Nothing works, and depending on what I try, I get one of four returns: #Error, #Name?, the =Date() returned to me as text instead of as the day's date, or the opposite value from what I specify - as in, if I say to return the date on "Yes," it returns it on "No" instead.
Here's a transcription of the first expression I tried - can anyone offer a rewrite which would accomplish the returns under the conditions I specified above? What else do I need to do to make this work?
Thanks,
Spherey
In Microsoft Access 2000, I'm building an expression in a form which I want to return 1 of 2 possible values. The relevant fields are PARC 1 Sent (a check box) and Date PARC 1 Sent.
What I want to have happen is this: if the PARC 1 Sent check box is not checked, I want the Date PARC 1 Sent to remain blank. On the other hand, if that box IS checked, I want the Date PARC 1 Sent to automatically display that day's date. I have tried many approaches - using =IIf, =IIf(IsNull, changing the check box to a Yes/No box, changing the format of the Date PARC 1 Sent in the underlying table from Date/Time to Text, removing the =Date() from the expression and replacing it with a text value (just to see if that was the problem). Nothing works, and depending on what I try, I get one of four returns: #Error, #Name?, the =Date() returned to me as text instead of as the day's date, or the opposite value from what I specify - as in, if I say to return the date on "Yes," it returns it on "No" instead.
Here's a transcription of the first expression I tried - can anyone offer a rewrite which would accomplish the returns under the conditions I specified above? What else do I need to do to make this work?
Code:
=IIf([Forms]![PARC Form]![PARC 1 Sent]="Yes", "=Date()", " ")
Thanks,
Spherey