Grouping in a Report

C

clarked

I understand that you can group in a report and then print out a group on a
seperate page. But how do I rpint out if I only want one group? Can I set a
parameter for text? I have got 100 groups (Names) and only want to print out
the infor for one name.
 
L

Larry Daugherty

Then you'd base your report on a parameter query or open your Report
with a Where clause that filters to just the record(s) you want.

HTH
 
C

clarked

Thanks Larry...how do you do a Parameter for text? I thought you could only
do it for value. Lets say I want a report that shows all the Items ina group
for "Ben Clarke". I want to be able to somehow click on his name and then
get my report.
 
A

Arvin Meyer

DoCmd.OpenReport "MyReport"
Reports!MyReport.Recordsource = "Select * From MyTable Where PersonID =" &
Forms!MyForm!lstPeople

lstPeople is a listbox (or can be a combo) of names with 3 columns:

Col.1, bound, hidden, PersonID
Col.2, LastName
Col.3, FirstName
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access
 
C

clarked

Thanks for the info Arvin but I don't understand where I put this criteria???
Is "MyReport" the name of the report I have created? I have got a report
that has got persons grouped with a list of items. I want to be able to
bring up the report for one specific person rather then them all. I have
worked out that you can put them on seperate pages but when I go to print the
report I get every page.
 
C

clarked

Arvin - I am a bit of a novice at this...where do I put the command you have
written? And I presume "YourReport" is the name of the report and "PersonId"
is the field for the persons name?
 
L

Larry Daugherty

Arvin's code goes into the OnClick event of your command button to
open the report. Substitute the name of your own report inside the
quotes of "YourReport". "PersonID" is assumed to be the name of the
field with the Primary Key of the record.

HTH
 
Top