Date and time criteria expressions
To specify date or time criteria for an operation, you supply a date or time value as part of the string expression that forms the criteria argument. This value must be enclosed in number signs (#).
Note
The number signs indicate to Access that the criteria argument contains a date or time within a string.
Suppose that you are creating a filter for an Employees form to display records for all employees born on or after January 1, 1960. You could construct the criteria argument for the form's Filter or ServerFilter property as in the following example. Note the placement of the number signs.
Forms!Employees.Filter = "[BirthDate] >= #1-1-1960#"
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for