B
Becca
Form1 has command button to open Form2 where the user
makes a selection.
Form2, with selection made, has command button to preview
report.
How do I inhibit the preview where no data exists? My
report's OnNoData event has "cancel=true", thus I get a
message that the open event is cancelled.
Help me? Thanks.
Becca
'*********************************************************
Private Sub btnStatement_Click()
On Error GoTo Err_btnStatement_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "rptClientStatement"
stLinkCriteria = "[ClientID]=" & "'" & Me![ClientID] & "'"
DoCmd.OpenReport stDocName,acViewPreview, ,stLinkCriteria
DoCmd.RunCommand acCmdFitToWindow
Exit_btnStatement_Click:
Exit Sub
Err_btnStatement_Click:
MsgBox Err.Description
Resume Exit_btnStatement_Click
End Sub
'*********************************************************
makes a selection.
Form2, with selection made, has command button to preview
report.
How do I inhibit the preview where no data exists? My
report's OnNoData event has "cancel=true", thus I get a
message that the open event is cancelled.
Help me? Thanks.
Becca
'*********************************************************
Private Sub btnStatement_Click()
On Error GoTo Err_btnStatement_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "rptClientStatement"
stLinkCriteria = "[ClientID]=" & "'" & Me![ClientID] & "'"
DoCmd.OpenReport stDocName,acViewPreview, ,stLinkCriteria
DoCmd.RunCommand acCmdFitToWindow
Exit_btnStatement_Click:
Exit Sub
Err_btnStatement_Click:
MsgBox Err.Description
Resume Exit_btnStatement_Click
End Sub
'*********************************************************