M
maura
I have formatted a report as a letter to go out to the
individual who's information is on the screen. I want the
user to be able to preview the letter for that individual
and then to print it. For some reason when I created the
command button it will preview the letter for all the
individuals in the database (code below) and when I add:
DoCmd.OpenReport stDocName, acPreview, , strcriteria
it brings up the letter but none of the fields are
populated. Please tell me what I am missing.
Thanks, Maura
All Individuals:
Private Sub cmdReminderLetter_Click()
On Error GoTo Err_cmdReminderLetter_Click
Dim stDocName As String
Dim intAccount As Integer
Dim strcriteria As String
strcriteria = "Account= " & Me.Account
stDocName = "rptReminderLetter"
DoCmd.OpenReport stDocName, acPreview,
Exit_cmdReminderLetter_Click:
Exit Sub
Err_cmdReminderLetter_Click:
MsgBox Err.Description
Resume Exit_cmdReminderLetter_Click
End Sub
individual who's information is on the screen. I want the
user to be able to preview the letter for that individual
and then to print it. For some reason when I created the
command button it will preview the letter for all the
individuals in the database (code below) and when I add:
DoCmd.OpenReport stDocName, acPreview, , strcriteria
it brings up the letter but none of the fields are
populated. Please tell me what I am missing.
Thanks, Maura
All Individuals:
Private Sub cmdReminderLetter_Click()
On Error GoTo Err_cmdReminderLetter_Click
Dim stDocName As String
Dim intAccount As Integer
Dim strcriteria As String
strcriteria = "Account= " & Me.Account
stDocName = "rptReminderLetter"
DoCmd.OpenReport stDocName, acPreview,
Exit_cmdReminderLetter_Click:
Exit Sub
Err_cmdReminderLetter_Click:
MsgBox Err.Description
Resume Exit_cmdReminderLetter_Click
End Sub