Hi Heather,
I don't understand your design. If the Primary Key field of your underlying
table is PeopleID then the where clause I gave you would open the report
with just one record in the report. Paste the code below into the Click
event of your Print Command Button. Substitute the names of the objects in
your application for the names in the subroutine below. The code below was
copied from the Click event of a command button that opens a report
Previewing one Person's record.
================================================== ======
Private Sub cmdPrintPersonRecord_Click()
On Error GoTo Err_cmdPrintPersonRecord_Click
Dim DocName As String
Me.Refresh
DocName = "rptLionPeople"
DoCmd.OpenReport DocName, A_PREVIEW, , "[PeopleID] = " & PeopleID
Exit_cmdPrintPersonRecord_Click:
Exit Sub
Err_cmdPrintPersonRecord_Click:
MsgBox Error$
Resume Exit_cmdPrintPersonRecord_Click
End Sub
================================================== =========
If the code doesn't work for you then post back with more information about
the design of your application. Especially give the name of the underlying
table and the names and datatypes of the first several fields in it. If the
above code returns several records then the Primary Key isn't a primary key
at all. When you set a primary key, no duplicates are allowed.
HTH
--
-Larry-
--
"Heather" <HW******@cox.net> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
This works great! The way it is displayed now is my form is still
fine. My report now displays the correct data (only the current
record) except it puts it on as many pages as my form is. For example,
My form is 5 pages. (01/05/05, 01/06/05, 01/07/05, 01/08/05, 01/09/05)
My report displays (01/09/05, 01/09/05, 01/09/05, 01/09/05, 01/09/05)
Is there syntax to only display one of these pages?