I have a query in access 2003 that currently has the following criteria in the "DateAdded" field (which is a date and time stamp):
This obviously brings back only data from the last 3 days.
I would like to keep this the default, but I am trying to add textboxes that the user will be able to look at a certain period of data based on what they enter into boxes "Start Date" and "End Date" that are on the table.
The query is displayed on the same form as the new textboxes that I have created.
When the user enters the form, I have it automatically displaying the query with the default being what I listed above. The "Start Date" and "End Date" boxes will be empty until the user enters dates that they want to see. Then the command button will requery with the following criteria in the "DataAdded" field:
I have this code and the default code working independantly, I just need to know how to have the first be the default and the second work only when dates are entered into the search boxes.
Thanks
Code:
Between Now() And Now()-3
I would like to keep this the default, but I am trying to add textboxes that the user will be able to look at a certain period of data based on what they enter into boxes "Start Date" and "End Date" that are on the table.
The query is displayed on the same form as the new textboxes that I have created.
When the user enters the form, I have it automatically displaying the query with the default being what I listed above. The "Start Date" and "End Date" boxes will be empty until the user enters dates that they want to see. Then the command button will requery with the following criteria in the "DataAdded" field:
Code:
Between [Forms!]![frmChad]![Start Date] And [Forms!]![frmChad]![End Date] Or Is Null
Thanks
Comment