Hiya
Probably something really quick to fix but I have an if statement which does something if a certain date exists in a date field.
So for example
If dob = 1970 then
msgbox "correct"
else
msgbox "incorrect"
endif
This works fine when a date exists in the date field, but brings up "invalid use of Null" error. The code is in the On_Open section of the form.
I tried adding...
If dob is not null and dob = 1970 then....
But this then brings up "Object required" error...
Any ideas?
Probably something really quick to fix but I have an if statement which does something if a certain date exists in a date field.
So for example
If dob = 1970 then
msgbox "correct"
else
msgbox "incorrect"
endif
This works fine when a date exists in the date field, but brings up "invalid use of Null" error. The code is in the On_Open section of the form.
I tried adding...
If dob is not null and dob = 1970 then....
But this then brings up "Object required" error...
Any ideas?