Use Direct-X date picker to pick date range for query

G

Guest

I have set up a data base with a query-based form in which I enter a range of
dates to call up a set of records...so far so good. I also have a Direct-X
date picker which is very easy to use and which I can plunk almost anywhere
in a form. What I want to do is use the date picker to pick the dates for
the query. Can I do this with a macro (i.e. have two fields, each with a
date picker, saying "from (date)" and "to (date)" and then a button that puts
these two values into the two query prompts (i.e. "date from" and "date to")?
If this is possible how would I go about setting up the macro? Does anybody
know any other way I can do it? Basically what I want is to create a
query/form where it is easy to enter the date range.

Thanks for any responses.
 
G

Guest

I don't think you need a macro. You can have your query point to the
DatePickers in the criteria row, that same as you would with a regular
textbox. For example, if your Date pickers are called txtDateFrom and
txtDateTo, under the date column in your query, you'd put this in the
criteria:
Between Forms!MyFormName!txtDateFrom and Forms!MyFormName!txtDateTo

Barry
 

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

Error with Date Picker 3
Date Picker Default? 1
Access 2007 date picker property 2
date time picker 1
Date Time Picker 2
Date Picker - 2007 2
Date Picker with Inputmask 3
Allen Browne's Date Picker 8

Top