Date Query

G

Guest

Currently I have a report that links to a Query. The
query has a Criteria in the "Date" column for [Date of
Test]. When the report is run a box opens in which the
test date is typed in and the appropriate information is
displayed in the report.
What I want is a little more user friendly method. I am
looking for a way to have the Calander Control open when
the report is run and the user simply clicking on the
appropriate date to satisfy the criteria of [Date of
Test]. I do not want a Date Range, I want a specific date
to come up. Is there any way to do this?
Thank you for your time.

C.R. Houk
charles.houk2<remove>@charleston.af.mil
 
N

Nikos Yannacopoulos

Make a new form and place a Date and Time Picker control (ActiveX) and a
command button on it.
In your query design, set the date criterion to Int(FromName!ActiveXctl1),
using of course the actual form name and DT Picker control name, if
different. The Int() function is used so it returns a "clean" date rather
than a date with a time part, in which case the query will find no matches.
If you are currently running the report directly form the database window,
employ a macro or a command button on a form (possibly a Switchboard)
instead to run the report. The macro or command button code should open the
form with the DT Picker, and set the value of the DT Picker to the current
date, or whatever you want to default in (otherwise the DT Picker will
always display the date it was created on).
Last, the command button on the date selection form should run the report
and close the DT Picker form.

HTH,
Nikos
 

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

Top