Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can I be E-mail notified when row added

Status
Not open for further replies.

gulbrads

IS-IT--Management
Feb 24, 2000
2
US
I created a database using Access '97 that receives information from a form on my Web page. Since it is Access I don't want to have it open on my desktop because it would lock out users on the Web page (we will be moving to SQL server soon, but as of now I'm stuck with Access) and I was wondering if there was any way to be notified by e-mail when a row has been added.<br>
Thanks<br>
Danielle
 
You can build into the after Insert event a command that will send you an E-Mail. The format for it is:<br>
------------------------------------------------------<br>
DoCmd.SendObject acSendQuery, &quot;qryInstalledAssets - Delete&quot;, acFormatRTF, person to send note to,, , &quot;Deleted Installed Asset&quot;, &quot;This asset was deleted on &quot; & Now(), False<br>
--------------------------------------------------------<br>
Refer to HELP for additional information on the SendObject command.
 
Okay, um, I found where to create a macro, if that's what I need to do, but I'm kind of lost after that. If you don't mind could you give me a more idiot proof version of how to set it up? Sorry, I'm fairly new at Access.<br>
Thanks!!<br>
Danielle
 
He's giving you VBA code, not macro commands. Here's a little more detail:<br>
<br>
1) Go into design view of your form<br>
2) Click on the Properties icon on the toolbar<br>
3) Click on the Evnet tab<br>
4) Click on the [...] button next to the OnInsert event <br>
5) Select Code Builder. <br>
6) Key his code there, between the Sub & End Sub lines.<br>
7) Customize the parameters, referring to &quot;DoCmd.SendObject&quot; in Access Help. <br>
<br>
BTW - anyone - why does opening Access &quot;lock out the users on the web page&quot;?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top