help with a form

  • Thread starter Thread starter zaps via AccessMonster.com
  • Start date Start date
Z

zaps via AccessMonster.com

Hi there,
I would like to be able to set up buttons on a form where users can type in a
start and end date. I would then like to use the dates entered in a query.
How can I set it up so that the dates chosen on the form, be can used in a
query?

Thanks,
Zzzzzaps
 
zaps,

Let's say you have two unbound text boxes on your form: txtStart and txtEnd,
and let's say you have a query like:
SELECT Who, What, When <--- your date field
FROM It

If you wanted to filter the records that existed between txtStart and
txtEnd, you'd type the following in the criteria row of your When field:

Between Forms!YourFormName!txtStart AND Forms!YourFormName!txtEnd

Then add a command button to your form to open the query, or open another
form or report with the query as the recordsource.

Does that help?

Brian
 
Back
Top