Need to know how to restrict what I want in my report

terry518

New member
Local time
Today, 09:56
Joined
Mar 26, 2004
Messages
9
Ok The problem starts off with my 2 tables. One has
employee information like name, ID number, and department.
The other has training information such as what you were
trained in and etc. The employee information has a column
for what department they are in. I need to know how to
create a report so that when you click on the report it
pops up with a form asking which department you want to
see training for. Then all the people who have received
training in that department will pop up. Also that would
need to be a drop down menu because they only have so many
departments to be in.

Thanks
Terry
 
- Create a form with a drop-down department list
- Create a query that includes all the information you want in the report.
- In that query you must have the department field. In the criteria for that field, you must reference the drop-down department list on that form you created. Use an expression like Forms!mydepartmentlistform!cboDepartments, but be sure to replace the sample names with the actual name of your form and drop-down control.
- Create the report and use the query as the recordsource for the report.
 
Let me add that you use the form to call the report, so you should not call the report first. Or, you could have the report check to see if the form is open, and if not, open the form and close the report. You can't use a drop-down list in a report or in a query, so this is really the only way to get a combo box of departments.

If you try to open the query directly (without having the form open) it will prompt you for the parameter that it needs since it cannot find the form.
 
Okay I finally understand what I need to do, but I have one more problem. I have 12 departments to choose from. So I made my table with the departments, then my form with the combo box with the departments, and my query to restrict the report. The problem is that when I open up the form with my combo box it says that I have 12 entries. It show 1 of 12 at the bottom. Because it says I have 12 entries, when I start up my report it repeats all the training thats been done by people in that department 12 times. How do I get it only to have one choice and show my report the right way.

Thanks
Terry
 

Users who are viewing this thread

Back
Top Bottom