Maybe I'm missing something or perhaps there's another way to do this. I'm trying to allow the user to preview and print an invoice as they are exiting from the New Sale form. However, the preview opens but closes after a second. Can anyone give me a clue?
Thanks
Code:
Thanks
Code:
Code:
If MsgBox("Do You Want To Create An Invoice?", vbDefaultButton1 + vbYesNo) = vbYes Then
Dim stDocName As String
stDocName = "rpt_Invoice"
DoCmd.OpenReport stDocName, acViewPreview
Else
End If
DoCmd.Close acForm, "frm_New_Sale", acSaveNo
Comment