chenning said:
I want to convert an Access form record (not the entire file) into a pdf so
that the single form record can be emailed. How do I do this?
You don't mention what version, but the general approach here is to build a
report that lays out the information the way you want, and then convert that
two pdf, and then attach the two e-mail
in access 2007, the above processes can be done in about two or three lines
of code. if the using a previous version, then things get a little bit more
tricky as pdf supports not built in.
So, for access 2007, the following code would allow you to e-mail your
current form as a PF document and launch a look for you what the pdf
document already attached.
Dim strReport As String
strReport = "faxbook"
Me.Refresh
DoCmd.OpenReport strReport, acViewPreview, , "id = " & Me!id
DoCmd.SendObject acSendReport, strReport, acFormatPDF
DoCmd.Close acReport, strReport
So the above would actually the launch outlook or your e-mail client with a
pdf of the current screen record already attached as a pdf, slowly above is
quite and I set of commands that are built into access 2007.
if you're using a previous version, then you'll have to grab Stephens PT of
creation code here:
http://www.lebans.com/reporttopdf.htm
Using the above pdf code is a little bit more difficult, since after you
create the pdf document, you'll have to automate the e-mail client and it
attach that pdf. So, this will involve a bit more complex code.
I let you digest the post so far. As how difficult this process will be much
depends on what verson MS access you are using.