Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

a button that will send email with preloaded info. 1

Status
Not open for further replies.

BubbaJean

IS-IT--Management
Jun 5, 2002
111
0
0
US
Acccess 2000

I created a button to send a email preloaded with the following information
... auto fill email address
... auto fill subject
... auto attach file

below is my poor atempt at coding this
Private Sub cmdEmailNew_Click()
On Error GoTo Err_cmdEmailNew_Click

'Dim stDocName As String
'opens an e-mail with the address in a form field

Dim email As String
Dim subject As String
Dim stDocName As String


'do one
email = ([Forms]![frmCustomerRFQ]![txtEmail])
DoCmd.SendObject acSendNoObject, "", "", email


'do two
subject = ([Forms]![frmCustomerRFQ]![txtCustNo])
DoCmd.SendObject acSendNoObject, "", "", subject

'do three
stDocName = "rptRFQReponseLetter"
DoCmd.SendObject acReport, stDocName


Exit_cmdEmailNew_Click:
Exit Sub

Err_cmdEmailNew_Click:
MsgBox Err.Description
Resume Exit_cmdEmailNew_Click

can someone help me make this mess work
thanks in advance
 
In only one line:
DoCmd.SendObject acReport, "rptRFQReponseLetter", , [Forms]![frmCustomerRFQ]![txtEmail], , , [Forms]![frmCustomerRFQ]![txtCustNo]

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top