I have the following code on my button
Private Sub cmdPrintQuote_Click()
'Open report Quote. Change to acViewNormal for printout
On Error GoTo macQuoteReport_Err
DoCmd.OpenReport "rptQuote", acPreview, "", ""
macQuoteReport_Exit:
Exit Sub
macQuoteReport_Err:
MsgBox Error$
Resume macQuoteReport_Exit
End Sub
However I only want the report to print if txtTotalPrice (also on the form) contains some data. Is this possible, and if so what code do I need to add??
Cheers
Private Sub cmdPrintQuote_Click()
'Open report Quote. Change to acViewNormal for printout
On Error GoTo macQuoteReport_Err
DoCmd.OpenReport "rptQuote", acPreview, "", ""
macQuoteReport_Exit:
Exit Sub
macQuoteReport_Err:
MsgBox Error$
Resume macQuoteReport_Exit
End Sub
However I only want the report to print if txtTotalPrice (also on the form) contains some data. Is this possible, and if so what code do I need to add??
Cheers