G
Guest
i have a print command on one of my forms. When you click the print button, a
quote is printed. A msgbox appears asking did the quote print. if the user
select yes then certain controls are adjusted. If user clicks no nothing
happens. Here is my code. When the user clicks no i want the code to print
the quote again and then display the same msgbox. i know i need to use the
loop statement but ive had no success. Can anyone help??
Private Sub PrintQuoteReport_Click()
'Print Quote From Work Order Form.
Dim stDocName As String
stDocName = "New Quote Report"
DoCmd.OpenReport stDocName, acNormal
'Display MsgBox To Confirm If Quote Has Been Printed.
Dim Response6 As Byte
Response6 = MsgBox("Has The Quote Printed? ", vbYesNo +
vbQuestion, "Work Order's Database")
If Response6 = vbYes Then
'Once Quote Is Printed Disable All Controls On Quote Tab.
Quote_Valid_For_Days.Enabled = False
QuotePreparedByCombo.Enabled = False
QuoteCreatedDate.ForeColor = 11053139
Label284.ForeColor = 11053139
Conditions.Enabled = False
'Once Quote Is Printed,Status Is Changed To Quote Sent.
Combo73.Value = "Quote Sent"
'Creates Date In Date Printed Field When Quote Was Printed.
QuoteCreatedDate.Value = Date
'Change Status Date.
StatusDate.Value = Now
End If
End Sub
quote is printed. A msgbox appears asking did the quote print. if the user
select yes then certain controls are adjusted. If user clicks no nothing
happens. Here is my code. When the user clicks no i want the code to print
the quote again and then display the same msgbox. i know i need to use the
loop statement but ive had no success. Can anyone help??
Private Sub PrintQuoteReport_Click()
'Print Quote From Work Order Form.
Dim stDocName As String
stDocName = "New Quote Report"
DoCmd.OpenReport stDocName, acNormal
'Display MsgBox To Confirm If Quote Has Been Printed.
Dim Response6 As Byte
Response6 = MsgBox("Has The Quote Printed? ", vbYesNo +
vbQuestion, "Work Order's Database")
If Response6 = vbYes Then
'Once Quote Is Printed Disable All Controls On Quote Tab.
Quote_Valid_For_Days.Enabled = False
QuotePreparedByCombo.Enabled = False
QuoteCreatedDate.ForeColor = 11053139
Label284.ForeColor = 11053139
Conditions.Enabled = False
'Once Quote Is Printed,Status Is Changed To Quote Sent.
Combo73.Value = "Quote Sent"
'Creates Date In Date Printed Field When Quote Was Printed.
QuoteCreatedDate.Value = Date
'Change Status Date.
StatusDate.Value = Now
End If
End Sub