Loops in SendObject command

Webmaster@worksnotfun.com

Registered User.
Local time
Today, 20:02
Joined
Jan 28, 2002
Messages
15
I'm really stuck. I have a form which I have set up a cmdbutton. There are 3 different thing that can occured, an approval (check mark), a reject (check mark) or an interim (check mark). I would like the user to click the command button, and if the part check mark is approved, it would send a email message, or it rejected, send an email messgae. I can only get this to work, if I sent up 3 different buttons, one for approval, reject & interim status.
 
Private Sub cmdSendMail_Click()
If chkQuote.Value = -1 Then
DoCmd.SendObject acReport, "Quote", _
"Rich Text Format(*.rtf)", _
[Forms]![frmEmailInv]![txtEmailAdd], _
"", "", "Quote", "", False, ""
MsgBox "E-Mail has been sent"
End If
If chkQuote.Value = 0 Then
DoCmd.SendObject acReport, "Invoice", _
"Rich Text Format(*.rtf)", _
[Forms]![frmEmailInv]![txtEmailAdd], _
"", "", "Invoice", "", False, ""
MsgBox "E-Mail has been sent"
End If
If chkPastDue.Value = -1 Then
DoCmd.SendObject acReport, "Past Due Invoice", _
"Rich Text Format(*.rtf)", _
[Forms]![frmEmailInv]![txtEmailAdd], _
"", "", "Invoice", "", False, ""
MsgBox "E-Mail has been sent"
End If
End Sub

This should get you close.
 
Thanks a MILLION, it works like a charm. I'm thinking of naming my first born Stoner!
 
You really wouldn't do that to a poor defenseless child would you?
 

Users who are viewing this thread

Back
Top Bottom