Hi all,
I've got a form with several fields that get updated regularly. These fields have a "Before Update" event that changes the value of another field (called "DateModified")
The "datemodified" fields basically gets updated every time one of the original fields gets modified, so that way I know when the change was made. This works well and I can see how the "datemodified" field changes immediately after any original field is modified.
To add more functionality to the database, I am now trying to send an automatic e-mail to the people who needs to get notified of the change. First, however, I just want to get a message box to verify that the code works so I have added the following code to the "afterupdate" event to the "datemodified" field:
However, nothing happens. I can see the "datemodified" field getting modified, but the message box does not show up. I have tried adding this to a "change" and "beforeupdate" events, but nothing...
What is happening? Why are these events being ignored even when the field does get automatically updated?
Help would be greatly appreciated...I have been scratching my head for a while...
mafhobb
I've got a form with several fields that get updated regularly. These fields have a "Before Update" event that changes the value of another field (called "DateModified")
Code:
Private Sub Rudder_3D_Rate_BeforeUpdate(Cancel As Integer)
On Error GoTo BeforeUpdate_Err
'Set bound controls to system date
DateModified = Date
BeforeUpdate_End:
Exit Sub
The "datemodified" fields basically gets updated every time one of the original fields gets modified, so that way I know when the change was made. This works well and I can see how the "datemodified" field changes immediately after any original field is modified.
To add more functionality to the database, I am now trying to send an automatic e-mail to the people who needs to get notified of the change. First, however, I just want to get a message box to verify that the code works so I have added the following code to the "afterupdate" event to the "datemodified" field:
Code:
Private Sub DateModified_AfterUpdate()
MsgBox "Need to send e-mail to PS"
End Sub
However, nothing happens. I can see the "datemodified" field getting modified, but the message box does not show up. I have tried adding this to a "change" and "beforeupdate" events, but nothing...
What is happening? Why are these events being ignored even when the field does get automatically updated?
Help would be greatly appreciated...I have been scratching my head for a while...
mafhobb