sending the current record via email

A

amy ratcliffe

hi all
dont know if anyone can help me i am a bit of an amateur
on access97 (i know its old but we are getting xp very
soon). ive been building a database for work and it
currently contains 11000 records. I have a form with a
command button that i set macro to save record, open
outlook and send form and then move to next record.
Unfortunately this sends ALL records in the table as
attachment what I want it to do is send ONLY THE CURRENT
record by email...does anyone know if this can be done ??
Our tech guys dont seem to think so but advised me to post
on here.
thanks very much - appreciated.
p.s. modules scare me so if the answer involves one make
it easy for me to copy !!!! thanks :)
 
D

Dan Artuso

Hi,
Perhaps the easiest way to do this is to create a report based on a query
that pulls the same data as your form.
Now, I assume you have a primary key in your table and that it's in your
form's recordset. Make sure you have a control on your form that contains
this key.

In the query for your report, put this in the criteria line of your primary
key field:
Forms!NameOfYourForm!ControlWithPk

substitute your own names.

Now, in your macro, just email the report.
 
K

Kevin

Try the sendobject VBA command. Check help! You can send
the report suggested in a previous post.

The VBA command would look something like this!

DoCmd.SendObject acSendReport, Test,
acFormatHTML, "(e-mail address removed)", "yourCCAddres
(e-mail address removed),,YourSubject, Any generalMessage text
you want to send"

Hope this helps!

Kevin
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top