chanman525
IS-IT--Management
Hey All,
Been looking for a post to try and help me on this but can't seem to get it located, so I thought that I would go ahead and post something.
I am looking for a way to send a notifier when a new record has been successfully added to form.
Currently what I have is when a record is updated it prompts the user if they are sure they want to save the record, not a biggy. If they close the record (project database that has status' of open, close or postponed)it sends an e-mail notifying the selected e-mail particpants that the project was closed.
So what I am looking for is when a new record is entered and successfully saved it will send a mailer out noting again the select receipients that a new project has been entered.
I tried testing " if me.newrecord then '"mail it" on the after and before update but it always sees it as an existing record.
This is what I currently have in place. The msgbox is just for testing to know where I am falling in the "if" statement.
Private Sub Form_BeforeUpdate(Cancel As Integer)
If MsgBox("You have updated this record! Do you want to save changes before leaveing?", vbOKCancel, "Record Updated") = vbCancel Then
Me.Undo
Else
If Me.NewRecord Then
Call MailProject(Me.ID, "New")
Else
MsgBox "not a new record"
End If
End If
End Sub
Thanks for your time on this, and let me add that this place rocks - I have learned so much through this forum.
Been looking for a post to try and help me on this but can't seem to get it located, so I thought that I would go ahead and post something.
I am looking for a way to send a notifier when a new record has been successfully added to form.
Currently what I have is when a record is updated it prompts the user if they are sure they want to save the record, not a biggy. If they close the record (project database that has status' of open, close or postponed)it sends an e-mail notifying the selected e-mail particpants that the project was closed.
So what I am looking for is when a new record is entered and successfully saved it will send a mailer out noting again the select receipients that a new project has been entered.
I tried testing " if me.newrecord then '"mail it" on the after and before update but it always sees it as an existing record.
This is what I currently have in place. The msgbox is just for testing to know where I am falling in the "if" statement.
Private Sub Form_BeforeUpdate(Cancel As Integer)
If MsgBox("You have updated this record! Do you want to save changes before leaveing?", vbOKCancel, "Record Updated") = vbCancel Then
Me.Undo
Else
If Me.NewRecord Then
Call MailProject(Me.ID, "New")
Else
MsgBox "not a new record"
End If
End If
End Sub
Thanks for your time on this, and let me add that this place rocks - I have learned so much through this forum.