Email a Record of a Form

  • Thread starter Thread starter rhinogirl
  • Start date Start date
R

rhinogirl

Guest
I have looked through several messages and i am total confused :confused: to whether this can be done or not?

I have a form which users complete, they are needing to email the current form to another users by clicking on a button and the form becomes an attachment and they complete the emails address etc.

Is this possible to do? If not what other ways around this are there.

I have got my fingers crossed that you experts have the answers
 
Sure this can be done. Just create a button or something that you want to create an event on. Right click on it and go to "Build Event" and choose Code Builder. Next just put in the following code...

DoCmd.SendObject(acSendForm, "MY_FORM_NAME", acFormatRTF, "RECIPIANT", , , "MY SUBJECT", "Body of document"

Hope that helps. Lookup SendObject for other options.
 
tried the cmd sendobject as you have suggested but it emailed all the form and not only the record/form i had completed
 
rhinogirl, did you ever figure this out? I am trying to do the exact same thing and have had little luck finding a solution. Would be most appreciative for any help.

Thanks
 
Are you just wanting to send the details of a specific record that is currently displayed in a form?

If so, what Access version are you using?
 
I am actually creating a report based on a form. I currently have one command button that previews the current record of the form the user is on to a report, and another button that prints only the current record to the report. I accomplished that by using a Where parameter in the open report line like this:

DoCmd.OpenReport stDocName, acViewPreview, , "[RecordNo]=Forms!frmControlPoint!RecordNo"

I want the user to also be able to send an email from a command button that will preview the current record to the report, and send it as an attachment. Since there is no Where parameter in the SendObject method, I am at a loss as to how to accomplish this.

I am using Access 2002. Any help is greatly appreciated!

Thanks,
Kerry
 
Here's an example where you add the contents of a form to an email. Its not an attachment but it might give you some ideas
 

Attachments

Users who are viewing this thread

Back
Top Bottom