dates (1 Viewer)

MRDosGuy

New member
Local time
Today, 06:24
Joined
Jul 2, 2002
Messages
8
Hello everyone,
I'm having some trouble getting this to work: I have a series of 4 queries that each call up a data entry by a specific date (Between #XX/YY/ZZ# And #XX/YY/ZZ#). I have created a user interface using forms, for my database. Is there a way to allow a user to change these dates without having to go into the design view of each query? Better yet, can all four of these dates be changed by entering one date (all 4 queries use the same dates: the previous month)? Thanks for any information,
Ben
 

MRDosGuy

New member
Local time
Today, 06:24
Joined
Jul 2, 2002
Messages
8
A little more complicated than that, or maybe I didn't understand

Thanks for the reply, but i'm still having a little trouble getting it to work. I have 4 queries that are all displayed in one report. The report has to show changes made within the organization, so each query pulls out a certain change (ex: new hires, terminations, etc) and puts it into its section of the report. The queries retrieve the information that has been altered by looking for the alteration date in the table (the entire database pulls from one table) and, depending on what the alteration date is (which month and year), decided whether to put it into the report or not. Without going into the query's design view and changing the code, how can a user change the specified date?
Sorry to continue this, and thanks for you're patience,
Ben
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 06:24
Joined
Feb 19, 2002
Messages
43,371
You need to add two unbound fields to the form that you are running the report from. If you run the report via a switchboard or just selecting it from the db container, you need to make a new form with two unbound fields and a button who's click event will run the report. Then change the queries so that they reference the dates from the form.

Select *
From YourTable
Where ChangeDate Between Forms!YourForm!StartDate AND Forms!YourForm!EndDate;
 

MRDosGuy

New member
Local time
Today, 06:24
Joined
Jul 2, 2002
Messages
8
Thanks

Okay, its up and working now. Thanks for the help Pat and Jerry!
 

Users who are viewing this thread

Top Bottom