> I have a report that lists all attendees at a function with attendant
> details. I would like to be able to tell the report to pull a page
> for just One of the attendees and not print the entire report. Is
> this possible. I'm very new at access. Please be gentle.
Normally you would filter the report so that the data you don't want is absent
rather than trying to print certain pages. See the help for the WHERE argument
of the OpenReport method.
EX:
DoCmd.OpenReport "ReprtName", acViewPreview,,"Attendee = SomeValue"

Signature
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com
> I have a report that lists all attendees at a function with attendant
> details. I would like to be able to tell the report to pull a page for just
> One of the attendees and not print the entire report. Is this possible. I'm
> very new at access. Please be gentle.
Create a report that shows all of the attendees (as you appear to
already have done).
Then restrict the data to the report to just the one attendee you
wish. There are several ways to do this.
1) Using a form, add a command button.
Your table should have a unique prime key field.
In my example it is named [RecordID].
On the command button's property sheet write
[Event Procedure]
on the Click event line.
Then click on the little button with 3 dots that will appear on that
line.
When the code window opens, the cursor will be flashing between 2
already existing lines of code.
Between those 2 lines write:
DoCmd.RunCommand acCmdSaveRecord
DoCmd.OpenReport "ReportName", acViewPreview, , "[RecordID] = " &
[RecordID]
The above assumes a [RecordID] field that is a Number Datatype.
If, however, [RecordID] is Text Datatype, then use:
DoCmd.OpenReport "ReportName", acViewPreview, ,"[RecordID] = '" &
[RecordID] & "'"
as the Where clause.
For clarity, the single and double quotes are..
"[RecordID] = ' " & [RecordID] & " ' "
Change [RecordID] to whatever the actual field name is that you are
using.
See VBA Help files for:
Where Clause + Restrict data to a subset of records'
Open the form and display the attendee's record. Click the command
button.
Or ....
2) Create a query to use as the report's record source.
As criteria on the AttendeeID column, write:
[Enter Attendee ID]
You will be prompted to enter the Attendee's ID.
The report will show only that person's records.
Note: Always use the [AttendeeID] field, as there may be more than one
attendee with the same name.

Signature
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
bob6003 - 15 Jan 2007 00:59 GMT
Thank you. Worked like a charm.
> > I have a report that lists all attendees at a function with attendant
> > details. I would like to be able to tell the report to pull a page for just
[quoted text clipped - 54 lines]
> Note: Always use the [AttendeeID] field, as there may be more than one
> attendee with the same name.