Jody,
Use the optional Where clause of the OpenReport method. If you've never
written an event procedure, place a command button in form design view and
show its properties with View, Properties. Click on the Event tab, and click
into the On Click field. An ellipsis will appear on the right-hand side;
click it, and select Code Builder (if necessary--it may not show, depending
on your configuration). Then cut and paste the code below between the
Sub..End Sub lines. Save and exit.
On Error GoTo Err_Handler
Dim stDocName As String
Dim stWhere As String
stDocName = "YourReport"
stWhere = "[YourField] =" & Me![YourCorrespondingFormControl]
DoCmd.OpenReport stDocName, acPreview, , stWhere
Err_Exit:
Exit Sub
Err_Handler:
MsgBox Err.Description
Resume Err_Exit
Sprinks
Jody said:
The user needs to be able to print reports from a form and only the report
that correlates to the current record. I am not sure how to do this, any
suggestions would be appreciated. Thanks