G
Guest
Im using the following code
If Date >= (InvoiceCreatedDate + invoicepaidbydayscombo.Value) And
Combo73.Value = "Invoice Sent" Then
Dim Response5 As Byte
Response5 = MsgBox("Invoice Has Not Been Paid. Would you Like To
Print Payment Reminder Letter? ", vbInformation + vbYesNo, "Job Manager")
If Response5 = vbYes Then
DoCmd.OpenReport "Request For Overdue Payment", acViewNormal, "",
"", acNormal
Combo73.Value = "Payment Request Sent" 'Status to Payment Request
Sent.
PaymentReminderPrintedDate.Value = Date 'Current Date.
DoCmd.Close acForm, "frmWorkOrders", acSaveYes 'Close WO Form.
DoCmd.OpenForm "frmWorkOrders", acNormal, , , , acHidden 'Open WO
Form Hidden.
Else
End If
End If
the code stops at DoCmd.Close acForm, "frmWorkOrders", acSaveYes 'Close WO
Form. The code is trying to close the form whilst a report is being
generated/printed from the form. Is there any way i can introduce a timer
into the code which will allow the report to run before trying to close the
form?
If Date >= (InvoiceCreatedDate + invoicepaidbydayscombo.Value) And
Combo73.Value = "Invoice Sent" Then
Dim Response5 As Byte
Response5 = MsgBox("Invoice Has Not Been Paid. Would you Like To
Print Payment Reminder Letter? ", vbInformation + vbYesNo, "Job Manager")
If Response5 = vbYes Then
DoCmd.OpenReport "Request For Overdue Payment", acViewNormal, "",
"", acNormal
Combo73.Value = "Payment Request Sent" 'Status to Payment Request
Sent.
PaymentReminderPrintedDate.Value = Date 'Current Date.
DoCmd.Close acForm, "frmWorkOrders", acSaveYes 'Close WO Form.
DoCmd.OpenForm "frmWorkOrders", acNormal, , , , acHidden 'Open WO
Form Hidden.
Else
End If
End If
the code stops at DoCmd.Close acForm, "frmWorkOrders", acSaveYes 'Close WO
Form. The code is trying to close the form whilst a report is being
generated/printed from the form. Is there any way i can introduce a timer
into the code which will allow the report to run before trying to close the
form?