Using Access 2002:
I'm having trouble getting the date constants to work right. I'm trying to write code to find the most recent date when a student had a health checkup, compare this with the current date, and output their name if it was too long ago. However the constants for getting the current date don't seem to be functioning.
The code is in a form_load event. To test the date stuff I put the following line of code right at the start of the procedure.
This returns 'invalid use of null'
I tested the same code on a different form in a command button onclick event and it works fine. I also have working date code when the database loads. Can anyone tell me what the problem is please?
I'm having trouble getting the date constants to work right. I'm trying to write code to find the most recent date when a student had a health checkup, compare this with the current date, and output their name if it was too long ago. However the constants for getting the current date don't seem to be functioning.
The code is in a form_load event. To test the date stuff I put the following line of code right at the start of the procedure.
Code:
MsgBox ("The year is: " & Year(Date))
I tested the same code on a different form in a command button onclick event and it works fine. I also have working date code when the database loads. Can anyone tell me what the problem is please?
Comment