Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can I create a form to enter dates 1

Status
Not open for further replies.

Computethis

IS-IT--Management
Feb 5, 2001
28
US
I want to create a form that will pop-up and give the users two date fields for the begining and ending of a report.

I have already created the pop-up form with two unbound boxes...

Please help me intergrate this into the form....

Thanks,
Mitch
 
The following scenario works:

1.) create a table with STARTDATE & ENDDATE fields

2.) create a query for the report with "Between [startdate] And [enddate]" in the criteria grid.

3.) create a delete query that will delete the startdate & enddate fields from the table you just created.

4.) create a form that you use to enter the STARTDATE & END DATE bound to the table you just created.

5.) create an OK command button on your date form.

6.) create an on_click macro for the OK button that does the following:
- closes and saves the date form
- opens the report you want to have filtered by the
dates. The report should be feeding from the query
in step 2.

7.) create a on_close macro for the report that opens the a delete query to delete the dates from the table that is holding the dates. (This way everytime you open the date entry form it will be blank to enter new dates)

Thats all,

When done correctly it works fine and you can model the date form for various other reports that you would like to filter by date.
 
Why would you need to create table entries or records or anything else like that? You can use the unbound controls on the form without the need for creating and deleting records.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top