Multiple query results, one form?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I had one query which I copied 5 times, naming them 5 different names.
I have a form with 5 command buttons to run the five queries.

Is it possible to have the results of all five show up on one form.
The fields are all the same for each query, but the criteria will be
different for each result wanted. Mainly a date field.
I'm trying to end up with a view of 5 possible scenerios all on one form.
If yes, please explain code necessary.
 
I had one query which I copied 5 times, naming them 5 different names.
I have a form with 5 command buttons to run the five queries.

Is it possible to have the results of all five show up on one form.
The fields are all the same for each query, but the criteria will be
different for each result wanted. Mainly a date field.
I'm trying to end up with a view of 5 possible scenerios all on one form.
If yes, please explain code necessary.

A Query can - and usually will! - use a Parameter for its criteria.
Rather than having a literal date as a criterion on five queries, you
could have

=Forms![yourformname]![textboxname]

as a criterion, where textboxname contains a date value to be used as
a criterion.

Could you explain what "five scenarios" you have in mind? I suspect
that a single form with a single query will be adequate!

John W. Vinson[MVP]
Join the online Access Chats
Tuesday 11am EDT - Thursday 3:30pm EDT
http://community.compuserve.com/msdevapps
 
Okay: In medical setting: User wants to be able to see 5 sets of totals
based on given date ranges. It helps them determine what times need to be
allotted in a certain date range. They are 5 day, 14 day, 30 day, 60 day,
and 90 day.
The admission date is always day 1. Ex. Admission 10/12/04. The 5-day
report covers 10/12/04 through 10/16/04. The query as it stands now, lets
them type in 10/16/04 and it totals the date entered plus the previous 4
days .
Those results will determine how much time in minutes they need to make to
meet Insurance criteria for payments. They would like to be able to have
the application automatically fill in the 5, 14, 30, 60, & 90 day totals
once the admission date is entered. AND, they would like to be able to
visually see those 5 date ranges on one form all at one time.

John Vinson said:
I had one query which I copied 5 times, naming them 5 different names.
I have a form with 5 command buttons to run the five queries.

Is it possible to have the results of all five show up on one form.
The fields are all the same for each query, but the criteria will be
different for each result wanted. Mainly a date field.
I'm trying to end up with a view of 5 possible scenerios all on one form.
If yes, please explain code necessary.

A Query can - and usually will! - use a Parameter for its criteria.
Rather than having a literal date as a criterion on five queries, you
could have

=Forms![yourformname]![textboxname]

as a criterion, where textboxname contains a date value to be used as
a criterion.

Could you explain what "five scenarios" you have in mind? I suspect
that a single form with a single query will be adequate!

John W. Vinson[MVP]
Join the online Access Chats
Tuesday 11am EDT - Thursday 3:30pm EDT
http://community.compuserve.com/msdevapps
 
Back
Top