Access 2003 Rookie Question

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I want to create a button on a form that will ask me to specifiy a date range
and then apply that date range to two seperate queries and give me both
results.

How do I begin to think about this?
 
Start with a form that has two text controls. Use the labels to indicate
which will hold a start date, and which will hold an end date.

Create a query that returns data you want to see. Since you are describing
a "date range", one of the fields of data available must be a date field.
Use parameters in the Selection/criterion "cell" under that date field.
Your parameters will look something like:

Between Forms!YourForm!txtYourStart And Forms!YourForm!txtYourEnd

NOTE -- this approach will only work if the form is open, and the controls
have date values.

One more step -- in design view of the form, add a command button that opens
the query.

When you have this much working, work on the second query using the same
approach. Rather than add a second command button, consider adding the code
that opens the second query to the first command button.

Regards

Jeff Boyce
Microsoft Office/Access MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top