Grouping in a Report

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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.
 
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
 
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.
 
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
 
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.
 
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?
 
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
 

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

Similar Threads


Back
Top