K
Kevin Bruce
This probably Day One type stuff, but the simple answer hasn't made itself
apparent to me yet.
I have a button to which is attached an On_Click event that does the
following:
1. Prints a Letter of Agreement,
2. runs an update query that records the date of the Agreement being issued
and also fetches an invoice number from a table and attaches it to the
current recordset.
3. Prints an invoice for the items on the Agreement
4. Runs an update query that adds 1 to the last invoice number
5. Prints a summary
After number 2) above, the code stops running, and I don't know why. Below
is my code.
Thanks in advance for any assistance.
_Kevin
'Print the Agreement three copies
stDocName = "rptBookingPresenterAgreement"
For intPrintCount = 1 To 3
DoCmd.OpenReport stDocName, acNormal
Next intPrintCount
'update the records to show that the Agreement has been issued
'and record the booking fee invoice number for each event
stDocName = "qryBookingContractedToPresenterUpdate"
DoCmd.OpenQuery stDocName, acNormal, acEdit
'===============
'CODE STOPS HERE
'===============
'print the Booking Fee Invoice -- three copies
stDocName = "rptBookingFeeInvoice"
For intPrintCount = 1 To 3
DoCmd.OpenReport stDocName, acViewNormal
Next intPrintCount
'update invoice number
stDocName = "qryinvoicenumberupdate"
DoCmd.OpenQuery stDocName
'print the Presenter's schedule
stDocName = "rptBookingPresenterSummary"
DoCmd.OpenReport stDocName, acNormal
apparent to me yet.
I have a button to which is attached an On_Click event that does the
following:
1. Prints a Letter of Agreement,
2. runs an update query that records the date of the Agreement being issued
and also fetches an invoice number from a table and attaches it to the
current recordset.
3. Prints an invoice for the items on the Agreement
4. Runs an update query that adds 1 to the last invoice number
5. Prints a summary
After number 2) above, the code stops running, and I don't know why. Below
is my code.
Thanks in advance for any assistance.
_Kevin
'Print the Agreement three copies
stDocName = "rptBookingPresenterAgreement"
For intPrintCount = 1 To 3
DoCmd.OpenReport stDocName, acNormal
Next intPrintCount
'update the records to show that the Agreement has been issued
'and record the booking fee invoice number for each event
stDocName = "qryBookingContractedToPresenterUpdate"
DoCmd.OpenQuery stDocName, acNormal, acEdit
'===============
'CODE STOPS HERE
'===============
'print the Booking Fee Invoice -- three copies
stDocName = "rptBookingFeeInvoice"
For intPrintCount = 1 To 3
DoCmd.OpenReport stDocName, acViewNormal
Next intPrintCount
'update invoice number
stDocName = "qryinvoicenumberupdate"
DoCmd.OpenQuery stDocName
'print the Presenter's schedule
stDocName = "rptBookingPresenterSummary"
DoCmd.OpenReport stDocName, acNormal