I have a routine that prints a series of quotes based on the begining and ending quote numbers entered on form using the following code:
Private Sub Command7_Click()
PrintQuoteNo = Me.StartQuoteNo
While (PrintQuoteNo <= Me.EndQuoteNo)
DoCmd.OpenReport "QuotePrintSigned", acViewNormal, , "QuoteNo =" & PrintQuoteNo
DoCmd.Close acReport, "QuotePrint"
PrintQuoteNo = (PrintQuoteNo + 1)
Wend
End Sub
How can I convert the following code to email with a similar while statement. I need to be able to choose the starting and ending quote number.
Private Sub Command12_Click()
On Error GoTo Err_Command12_Click
Dim stDocName As String
stDocName = "QuotePrintSigned"
DoCmd.SendObject acReport, stDocName
Exit_Command12_Click:
Exit Sub
Err_Command12_Click:
MsgBox Err.Description
Resume Exit_Command12_Click
End Sub
Private Sub Command7_Click()
PrintQuoteNo = Me.StartQuoteNo
While (PrintQuoteNo <= Me.EndQuoteNo)
DoCmd.OpenReport "QuotePrintSigned", acViewNormal, , "QuoteNo =" & PrintQuoteNo
DoCmd.Close acReport, "QuotePrint"
PrintQuoteNo = (PrintQuoteNo + 1)
Wend
End Sub
How can I convert the following code to email with a similar while statement. I need to be able to choose the starting and ending quote number.
Private Sub Command12_Click()
On Error GoTo Err_Command12_Click
Dim stDocName As String
stDocName = "QuotePrintSigned"
DoCmd.SendObject acReport, stDocName
Exit_Command12_Click:
Exit Sub
Err_Command12_Click:
MsgBox Err.Description
Resume Exit_Command12_Click
End Sub