I have a search form which has a date text box in it. Upon clicking a button, I want it to automatically fill in today's date if there isn't anything in it. So far this is the code I have
If Me.TxtBoxDateReqTo = Null Or Me.TxtBoxDateReqTo = "" Then
Me.TxtBoxDateReqTo = Date
This however, does not work. I know the 2nd line is correct (after testing), so I know the "if" qualifications must be wrong. Anyone know what it should be reading. Thank you in advance to anyone who can help.
You can use the Nz function to return zero, a zero-length string (" "), or another specified value when a Variant is Null. For example, you can use this function to convert a Null value to another value and prevent it from propagating through an expression.