How do I use Calendar Control 8.0 to limit report content

P

Pete Sperling

I'm using Access 97.

I currently have a query which tells the user to Enter the desired date.
After the desired date is entered all records with that date are returned.
The only dates that appear in the database are for Saturdays. If the user
does not enter a date which is also a Saturday there are no records returned.

To prevent the user from entering an incorrect date by mistake, I would like
to have a form open that contains the ActiveX Control - Calendar Control 8.0.
The user would then select the specific date (on a Saturday) that is
desired. The user would no longer have to look up the specific date on a
separate calendar.

I currently have a control button "Desired Week" that opens the report,
after the user enters the desired date. How do I make the control button
open a form which contains the Calendar Control 8.0 and how do I make the
query for the report use the date selected from the Calendar Control 8.0? I
will have to remove the [Enter desired date] from the Criteria area of the
query for the report.

Any help greatly appreciated.
 
N

Newbie

Just add the calendar control to your form (that has the command button on
it) and name it - link any other control
change your query so that where you had Where datefield = [Enter Desired
Date]
change this to Where datefield = forms!formname!datecontrolname

HTH
 
Top