Help: Select criteria for query from combo box

BAT40

New member
Local time
Today, 12:55
Joined
May 18, 2007
Messages
5
Hi,

I made a form to show the number of employees below 30, between 30&40 etc..

Therefore, I made a count query per age group and displayed result on my form.

The problem is I want to use a combo box on my form to set a criteria (company name) for all my queries.

What should I do?

Thanks,

Bat
 
In query criteria put:
[Forms]![FormName]![ComboName]
 
I think thats a bit vague!
Can you describe it a bit better?
 
Details...

Sorry let me try to describe it a little more in detail.

Tables:
1. Employee information (includes birth date.)
2. Company description (from where I want to get the list for my combo box)
3. In between you have tables (3) describing relationship (contract with, paid by, work for) between employee and companies. My employees can be paid by a company but work for another.

==> We will admit for this exemple that I only take into account the Contract relationship.

Queries:

1. I made a query to calculate the age of all employees, I inlcuded the contract relationship table in the query. When I run the query I obtain a list of all employees, their age and the company with which they have a contract.

2. I then create count queries with criterias such as age <30, between 30 & 40..to show headcount per age group.

Form:
I want to make a form to show headcount per age group (queries 2.) of the company that I would select from the combo box on my form.

(I tried to input a criteria in query 1. linked to the combo box, but when I try to select a company, an error message appears saying the form is read only).

I hope this is the kind of details that you need and that it is clear enough.

Thank you very much for your help.

Bat
 

Users who are viewing this thread

Back
Top Bottom