E
erick-flores
Hello there, I am trying to display an error everytime a cmd button is
hit and a report is not selected. Below is the code I am using, it
works prefect, but when the actual report is selected and displayed it
also pop up a windows displaying the error again. So it looks like the
error is displaying everytime I either have selected a report or have
not selected a report. Can someone help me please, thanks
Private Sub PBPreviewDiag_Click()
On Error GoTo Handler
Dim stDocName As String
stDocName = Forms![Select Reports]!LBDiagReports.Column(2)
DoCmd.OpenReport stDocName, acPreview
Handler:
MsgBox "Select a report"
End Sub
hit and a report is not selected. Below is the code I am using, it
works prefect, but when the actual report is selected and displayed it
also pop up a windows displaying the error again. So it looks like the
error is displaying everytime I either have selected a report or have
not selected a report. Can someone help me please, thanks
Private Sub PBPreviewDiag_Click()
On Error GoTo Handler
Dim stDocName As String
stDocName = Forms![Select Reports]!LBDiagReports.Column(2)
DoCmd.OpenReport stDocName, acPreview
Handler:
MsgBox "Select a report"
End Sub