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

T

Terry

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
 
T

Terry

You wouldnt happen to be abel to be a little more clear on
what you told me to do. I'm pretty new using access and
not to good at linking stuff together or what to type in
for the criteria.
-----Original Message-----
I would create a form which, runs the report when a button is pressed.

1. Create a table listing all of your departments
2. Create a query pulling all of the data you think you
need, be sure to include the departments
 
M

Marshall Barton

Terry said:
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.


The simplest way is to set the report's rercord source to a
query where the department field has a criteria of:

=[Enter Department Number]

A better way that allows you to use a combo box is to use a
button on a form to open the report. The report's record
source can then use a criteria of:

=Forms!theform.thedeptartmentcombobox

I think the best way is to modify the wizard generated code
behind the open report button so that it utilizes the
OpenReport method's WhereCondition argument:

stWhere = "Department = " & Me.thedeptartmentcombobox
DoCmd.OpenReport stDoc, acViewPreview, , stWhere
 
D

Dave

Terry;

Go to Access Help and type in "criteria for reports."
This will give you step-by-step instructions on how to
build a dialog box to enter criteria for a report.

In other words, you click on the button to print the
report, but a dialog box appears. It requires you to
select from the drop-down list box, the department you
wish to have the report for. You select it and then
click "OK." The report will print.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top