Stangleboy
Programmer
I have been gone for a very long time, and thank you in advance for your help. I have a table with 2 date fields I want the latest date to populated in a new field. I wrote a very basic line in the query section but Access does not like my comma that starts my second statement:
LatestDate: IIf(Nz([DispoDate])>=Nz([PacketDate]),([DispoDate])),IIf(Nz([PacketDate])>=Nz([DispoDate]),([PacketDate]))
Each statement runs fine individually but placed together I get:
"The expression you entered contains invalid syntax, or you need to enclose your text data in quotes. It seems that Access is looking for another option like "AND" or "OR" or "<>" but that data comes out wrong.
Any suggestions how to fix this code or another way to write would be great, thank you.
LatestDate: IIf(Nz([DispoDate])>=Nz([PacketDate]),([DispoDate])),IIf(Nz([PacketDate])>=Nz([DispoDate]),([PacketDate]))
Each statement runs fine individually but placed together I get:
"The expression you entered contains invalid syntax, or you need to enclose your text data in quotes. It seems that Access is looking for another option like "AND" or "OR" or "<>" but that data comes out wrong.
Any suggestions how to fix this code or another way to write would be great, thank you.