By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,847 Members | 2,292 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,847 IT Pros & Developers. It's quick & easy.

Forms & Subforms and email

P: n/a
I have a main form which contains one subforms. All of the data is from
the same record. The main form contains the personals details and the
subform contains their order details. I would like to use a button which
would send that records (main form and subform details) in an email using
SENDOBJECT. However the SendObject sends the complete Orders table as an

How can I send the single record as email??


Liam Kitson
Nov 12 '05 #1
Share this Question
Share on Google+
1 Reply

P: n/a
You need to build a report that shows the main part, and the details part.

You can then convert whole complex mess to a word attachment (rtf).

Keep the format simple, and the rtf format export does NOT export
graphics and logos.

Then, in code you can lanuch the reprot to the ONE record you are viewing,
adn then launch the meail client.

strReport = "InvoiceEmail"

DoCmd.OpenReport strReport, acViewPreview, , "id = " & mybookingid
Reports(strReport).Visible = False

strEmailName = Nz(Me.EmailName, "")
strBodyText = "Hello " & Nz(Me.FullName)
strSubject = "Invoice from Joe Tools Company"

DoCmd.SendObject acSendReport, strReport, _
acFormatRTF, strEmailName, , , strSubject, strBodyText, True
Albert D. Kallal (MVP)
Edmonton, Alberta Canada
Nov 12 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.