A
Andrea Barton
I have a form with a print button that prints a report for the data in that
particular record. When the button is clicked, a prompt appears asking
“Print Comment?â€. If the control is checked (true) then I would like it to
print the data in the comment field along with the data for that particular
record. If the control is false I don’t want the comment data printed, only
the data for that record. I have the code set for the report on open to show
the prompt (dialog box) and the code set for the prompt (dialog box) print
comment, but it’s not working correctly, actually not at all. Any help you
can give would be greatly appreciated. Thank you.
Dialog Box
Private Sub OK_Click()
Dim strMsg As String
Dim strDocName As String
strDocName = "rptEqualizationLetter"
If Me.PrintAttach = True Then DoCmd.OpenReport strDocName,
acViewPreview, , , acDialog
Exit_OK_Click:
Exit Sub
End Sub
Report (OnOpen)
Private Sub Report_Open(Cancel As Integer)
Dim strDocName As String
strDocName = "PrintApplicationDialog"
blnOpening = True
DoCmd.OpenForm strDocName, , , , , acDialog
If IsLoaded(strDocName) = False Then Cancel = True
blnOpening = False
End Sub
particular record. When the button is clicked, a prompt appears asking
“Print Comment?â€. If the control is checked (true) then I would like it to
print the data in the comment field along with the data for that particular
record. If the control is false I don’t want the comment data printed, only
the data for that record. I have the code set for the report on open to show
the prompt (dialog box) and the code set for the prompt (dialog box) print
comment, but it’s not working correctly, actually not at all. Any help you
can give would be greatly appreciated. Thank you.
Dialog Box
Private Sub OK_Click()
Dim strMsg As String
Dim strDocName As String
strDocName = "rptEqualizationLetter"
If Me.PrintAttach = True Then DoCmd.OpenReport strDocName,
acViewPreview, , , acDialog
Exit_OK_Click:
Exit Sub
End Sub
Report (OnOpen)
Private Sub Report_Open(Cancel As Integer)
Dim strDocName As String
strDocName = "PrintApplicationDialog"
blnOpening = True
DoCmd.OpenForm strDocName, , , , , acDialog
If IsLoaded(strDocName) = False Then Cancel = True
blnOpening = False
End Sub