how do I open multiple queries with one criteria from a dialog or form?

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

Guest

I need to make a form that shows an individual employee's data by month. I have one table that stores the data for all employees, and I wrote queries for each month requesting last name as a parameter, and I made each query a subform in an unbound form. How do I get all the queries in the form to open from a single parameter entry?

For example, I need Johnson's numbers for the year by month. I wrote a query for each month with the criteria [Enter last name] in the last name field. I made each of these queries a subform in an unbound form. I dont' want to have to enter Johnson's name 12 times to get the form to open. There must be a method to this! Thanks!
 
I need to make a form that shows an individual employee's data by month. I have one table that stores the data for all employees, and I wrote queries for each month requesting last name as a parameter, and I made each query a subform in an unbound form. How do I get all the queries in the form to open from a single parameter entry?

For example, I need Johnson's numbers for the year by month. I wrote a query for each month with the criteria [Enter last name] in the last name field. I made each of these queries a subform in an unbound form. I dont' want to have to enter Johnson's name 12 times to get the form to open. There must be a method to this! Thanks!

Use ONE query. Not twelve queries.

You can create a Totals Query grouping by the month. I'm not sure what
these individual queries do, but you should be able to do it in one,
not twelve!
 
I need to make a form that shows an individual employee's data by month. I have one table that stores the data for all employees, and I wrote queries for each month requesting last name as a parameter, and I made each query a subform in an unbound form. How do I get all the queries in the form to open from a single parameter entry?

For example, I need Johnson's numbers for the year by month. I wrote a query for each month with the criteria [Enter last name] in the last name field. I made each of these queries a subform in an unbound form. I dont' want to have to enter Johnson's name 12 times to get the form to open. There must be a method to this! Thanks!

12 queries, one for each month?
12 sub-forms?
What are you going to do when you need 25 years worth of data?
And what's wrong with just one query that uses a user entered
parameter to return dates for a selected month as well as the selected
employee?

In any event, the short way to resolve the problem is to add an
unbound text control to the form header to enter the name in.
Then change each query criteria from,
[Enter Last Name]
to:
forms!NameOfForm!NameOfControl

A better short solution is to use a Combo Box on the form, with the
EmployeeID and EmployeeName and Department so that only the correct
Johnson's data will be returned. Frank Johnson in International Sales
wouldn't be happy to know his work was credited to Frank Johnson in
Local Sales. Or vice versa.

As long as this form is open, you need not re-enter the parameter.
 
-----Original Message-----
employee's data by month. I have one table that stores
the data for all employees, and I wrote queries for each
month requesting last name as a parameter, and I made each
query a subform in an unbound form. How do I get all the
queries in the form to open from a single parameter entry?month. I wrote a query for each month with the criteria
[Enter last name] in the last name field. I made each of
these queries a subform in an unbound form. I dont' want
to have to enter Johnson's name 12 times to get the form
to open. There must be a method to this! Thanks!
Use ONE query. Not twelve queries.

You can create a Totals Query grouping by the month. I'm not sure what
these individual queries do, but you should be able to do it in one,
not twelve!


.

There are 44 data values that I need to see for each month.
 
-----Original Message-----
employee's data by month. I have one table that stores
the data for all employees, and I wrote queries for each
month requesting last name as a parameter, and I made each
query a subform in an unbound form. How do I get all the
queries in the form to open from a single parameter entry?month. I wrote a query for each month with the criteria
[Enter last name] in the last name field. I made each of
these queries a subform in an unbound form. I dont' want
to have to enter Johnson's name 12 times to get the form
to open. There must be a method to this! Thanks!
12 queries, one for each month?
12 sub-forms?
What are you going to do when you need 25 years worth of data?
And what's wrong with just one query that uses a user entered
parameter to return dates for a selected month as well as the selected
employee?

In any event, the short way to resolve the problem is to add an
unbound text control to the form header to enter the name in.
Then change each query criteria from,
[Enter Last Name]
to:
forms!NameOfForm!NameOfControl

A better short solution is to use a Combo Box on the form, with the
EmployeeID and EmployeeName and Department so that only the correct
Johnson's data will be returned. Frank Johnson in International Sales
wouldn't be happy to know his work was credited to Frank Johnson in
Local Sales. Or vice versa.

As long as this form is open, you need not re-enter the
parameter.

Thanks Fred. There are 44 data values for each month,
plus quarterly totals and a yearly total that I need to
see on each report. The database is meant to be used for
one fiscal year only, then archived, and a fresh database
started for the next year. I will try your combo box
solution.
 
There are 44 data values that I need to see for each month.

<confusion> Ok; so select 44 fields in the Totals query. I'm not sure
I understand what you're asking!
 
Back
Top