Docmd.sendobject / E-mail with form values syntax error

hbrems

has no clue...
Local time
Today, 10:54
Joined
Nov 2, 2006
Messages
181
Not sure how to do this, but I have a button on my main form that is supposed to send an e-mail out with some details of the selected record in my subform.

DoCmd.SendObject acSendNoObject, , , "somebody@somewhere.com", , , Me!suborderlist.Form!Customer.Column(1) & " Issue ", Me!suborderlist.Form!Comments, False

This code is not working because I don't know how to refer properly to my subform fields.

Also, what is the best way for me to tell access which record I want to send?
 
sendobject will either

a) attach a specified report, query, form etc

and/or

b) include a specified message text as any other e-mail

it depends how you want to see your information - if you want to send a nicely formatted result, create a report to show your single item, and send that. You don't need to open it to send it.

Referring to subforms is a bit different. I always have to look it up also. look in help "forms, referring to in expressions" -
 

Users who are viewing this thread

Back
Top Bottom