Private Sub cmdPrintRpt_Click()
On Error GoTo Err_cmdPrintRpt_Click
Dim stDocName As String
stDocName = "CPEReport"
docmd.OpenReport stDocName, acPreview, , "LastNameInitl = '" & Me.LastNameInitl & "'"
Exit_cmdPrintRpt_Click:
Exit Sub
Err_cmdPrintRpt_Click:
MsgBox "No Program or Sponsor Data Entered for this Attendee"
Resume Exit_cmdPrintRpt_Click
End Sub
I am using the above program to print a report based on the Name of the individual wanting the report. However I am now needing to have two where conditions "Name Field and Y/N field" to generate the report in the form I am wanting.
I am not sure of the syntax of the Open Report,,,Where Statement to generate the Type of Report I am wanting.
Thank you for your help in this matter
Robert M