Email on Record Count

feebert

Registered User.
Local time
Today, 15:43
Joined
Jan 7, 2003
Messages
24
I want to send an email to a user when an new record is added to a certain table.

I found some code on this subject, but all it does is use the recordCount function to generate an email.
I need to be a little more specific. I want to be able to send and email with some details on the new record that was been added.

For example, when an order is generated, I would like to send an email notification to a supervisor with the order number and some other details.

I was planning on using the OnTimer event of a form to do a recordCount, but I need to be a little more specific.

Can anyone help.

Thanks in advance, this forum rocks for info.
 
feebert,

I don't know about the email part.

If you want to notify someone when a record
is inserted, use the BeforeInsert or
AfterInsert event. You will have all the
field values at hand.

You could also use the BeforeUpdate or
AfterUpdate events to notify of revisions.

Wayne
 
Wayne

Thanks for the reply

I should have been clearer.

The record is not added to the database using an access form, and I am not adding a record to an access table.

I was actually wanting to monitor an SQL 7.0 dataset.

You see, I want to monitor the 'order' table and look for any new orders, and email the details of it to the appropriate person.

I need to do this from MS Access.

Any Thoughts!
 
feebert,

If you have any control over the database you
can add a date/time stamp to the record and
populate it when it is added.

Then a simple query will return the records
added since the last "batch". You will only
have to maintain the date of the last "run".

Wayne
 
Thanks

I will try this first thing monday!

Thanks Wayne
 

Users who are viewing this thread

Back
Top Bottom