Search between dates

  • Thread starter Thread starter PE Tim
  • Start date Start date
P

PE Tim

Guest
Hi

I'm reasonably new to Access databases and I'm trying to create a button that gives me the option to search between 2 dates in one field and return the results in a new form (based on the search form).

To explain further - it's to sort out when our customers cars a due for service so we know when to send a reminder.

Any help would be appreciate.

Thanks
 
link a new form to the button, the new form is based on a query..

in the said query put in the criteria box the between dates you require...

if it is referenced to fields then you put that in also rather than set dates..

you can use the query builder to create the formula..

have a search on the forum for dates within queries.. its been looked at lots of times before...

hth

John
 
John's answer is correct, but here's a more detailed guide to what you can do.

You need to enter a criterion in the criteria line of your query then supplies the start and end date. You can do this in two relatively simple ways.

If you type in the criteria box:
Code:
Between [Please enter start date] and [Please enter end date]
then the user will be prompted to supply these dates any time you run the query.

The second way is to capture these dates is by using two text boxes on your form, and passing these to the query instead of using prompts. Suppose your text boxes are called [txtStartDate] and [txtEndDate] and you form is called frmMyForm, your query criterion becomes:
Code:
Between forms!frmMyForm!txtStartDate and forms!frmMyForm!txtEndDate
 
Why not just have a filtered "reminder" form that pops up on start up with a list of services due within say the next 28days, or that are already overdue?
 

Users who are viewing this thread

Back
Top Bottom