I have a form that creates a new ticket. Click save on the form and the form
closes and updates the form underneath. I would like to print a report from
this form when I hit the save button all at the same time.
Here is what I have been working with.
Private Sub btnAddNewMaint_Click()
Dim stDocName As String
Dim stReportName As String
stDocName = "frmCustomer"
stReportName = "rptMaintTicket"
MsgBox "Print a copy for tech to printer xxxxxxxx.", vbOKOnly, "Tech
Ticket"
DoCmd.OpenReport stReportName, acPreview
DoCmd.Close
DoCmd.OpenForm stDocName
'refresh
DoCmd.DoMenuItem acFormBar, acRecordsMenu, 5, , acMenuVer70
End Sub
This seems to flash the Preview screen but closes it. Also the form is left
open.
Can this be done in one action?
Gerald
--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...ccess/200612/1