I'm having an issue with what I feel should be an easy to implement code.
I'm filtering a Report based on criteria selected in a Form... Something I'm familiar with and have done many times. Except, in this case I'm working with Dates and it is throwing me off.
Here is the relevant code:
if checkboxExpiration.value= -1 then
Criteria = "[Warranty Expiration] < " & Date
DoCmd.OpenReport stDocName, acPreview, , Criteria
end if
The result is a blank report, however, if I change the sign to > I get the full report minus any records where Warranty Expiration is null.
I've checked the report and made sure that Warranty Expiration is formatted as date.
Clearly I can use a workaround by creating separate Queries and reports based on those queries but I'm trying to avoid that.
Any quick ideas?
Thanks.