Events on database?

kbrooks

Still learning
Local time
, 23:05
Joined
May 15, 2001
Messages
202
I know there are events on a form or report (On Update, On Open, etc) but is there anything similar on the database?

I want to be able to send a email to one person whenever a new record is added to the database. I'm having a heck of a time figuring it out...any help would be much appreciated!
 
A new record will be added through a form, so why can't you use a form's events?

Col
 
Well I thought that too but couldn't get it to work so I assumed it was the wrong place to add it. And in this case, the form they fill out is on a webpage....the information is then sent to a database.
 
You wrote
<<
I know there are events on a form or report (On Update, On Open, etc) but is there anything similar on the database?
>>

In a word , "no".

RichM
 
kbrooks said:
Well I thought that too but couldn't get it to work so I assumed it was the wrong place to add it. And in this case, the form they fill out is on a webpage....the information is then sent to a database.

Feel sorry for the person getting these emails:

Code:
If Me.NewRecord then
   'send the email
else
   'nevermind
end if
 
mission2java_78 said:


Feel sorry for the person getting these emails:

Code:
If Me.NewRecord then
   'send the email
else
   'nevermind
end if

Scratch that...

You want to send the email once the user has FINISHED creating the record...so maybe you want a "Save" button to trigger this. Either way...once the record has been completed just send the email...it could be behind an event or a button...Im more thinking button since none of the events determine when your record is complete.
 
Well the users don't ever have any contact with the database. They fill out a form on the website (Front Page), click Submit, and the results can either be sent to a database or to an email, but not both. I currently have it going to a database so we can manage the data, but then it's up to IS to go in periodically and check for new records, and they've asked for email notification.

I'm stumped.
 
kbrooks said:
Well the users don't ever have any contact with the database. They fill out a form on the website (Front Page), click Submit, and the results can either be sent to a database or to an email, but not both. I currently have it going to a database so we can manage the data, but then it's up to IS to go in periodically and check for new records, and they've asked for email notification.

I'm stumped.

Why are you stumped?

Give IS what they want...they want an email on a new record...so whenever a record is submitted send an email.
 
They want email notification....not all the data in an email. They still want that in a database, so I was trying to find an event to fire off an email in Access.
 
Let me ask you something...

when you submit is that *always* a new record?

If yes .. than I still dont see why you're stumped...
you dont have to SEND all the DATA in the email. You send that data to the database. Your email content can be a little reminder like:

EmailSend.Subject="Yo New Customer"
EmailSend.Body="New Record Created"
EmailSend.Recipients.Add="IS TEAM GROUP"
EmailSend.Send

There is nothing in there that says you have to send all the data...
 
I understand that. My question is HOW to send the email. I can't do it from the Front Page form since it's either to a database or to an email...I can't do both. And from what was said above, there is no event on a database that would cause it to send off an email. The user is not on an Access form so I can't use an event or a button there.

Is there something I'm missing?
 
kbrooks said:
I understand that. My question is HOW to send the email. I can't do it from the Front Page form since it's either to a database or to an email...I can't do both. And from what was said above, there is no event on a database that would cause it to send off an email. The user is not on an Access form so I can't use an event or a button there.

Is there something I'm missing?

How do you submit if there is no button?
There has to be some mechanism you are using to send the data to the database right? Post that mechanism...you use that SAME trigger / event to shoot of an email. Look at the outlook object model if you are using exchange.

Jon
 

Users who are viewing this thread

Back
Top Bottom