Stupid newbie question on filtering reports or generating report from a query: (1 Viewer)

bpd

Registered User.
Local time
Today, 08:51
Joined
Feb 16, 2005
Messages
15
I have one table that tracks personnel information (lastname, firstname, department, etc...). A second table that lists all of the various types of qualifications throughout the organization (qualnumber, qualtitle). A third table combines the data to store each qualification record assigned/completed.

I can generate a report that lists the lastname and corresponding qualification status of ALL personnel records. (very nicely - each person has his own page in the report and the data is correct). [I used report wizard to take "lastname" from personnel info table; "qualnumber" and "qualtitle" from qual table; and "duedate", "completiondate", "%complete" from the third table.

Here is the question:

How do I generate the EXACT same report but with only one individual??? (I know that I can use the navigation buttons on the original report and go through each page and then print the one I want, but it has to be simpler than that)

I would like to have have a simple form that has a combo box to select the "lastname" and then a command button to generate the report for only this individual (everything the same, but for the one record only).

I have tried getting this from a query that asks for last name, but my result is that I get all of the same pages of information - except the last name never changes (even though the data does). ie: it thinks all 50 people have the same last name now.

Help please:
 

RichO

Registered Yoozer
Local time
Today, 08:51
Joined
Jan 14, 2004
Messages
1,036
In the code beneath your command button, you can specify a filter when opening the report:

Code:
DoCmd.OpenReport "MyReport", acPreview, , [COLOR=DarkRed][b]"lastname = '" & cboLastName & "'"[/b][/COLOR]
 

bpd

Registered User.
Local time
Today, 08:51
Joined
Feb 16, 2005
Messages
15
Thanks. I'll try it out tomorrow at work.

I assume "myreport" is the name of the report that generates data on everyone, so I should substitute the name of my report there.
 

Users who are viewing this thread

Top Bottom