Simple macro not running on AfterUpdate

  • Thread starter D. Shane Fowlkes
  • Start date
D

D. Shane Fowlkes

I have a form what on the AfterUpdate event is supposed to call a macro.
The point of the macro is simply to update a field value (in a table) to
indicate the last time the record was updated. So, in the AfterUpdate
property in the form's design, I simply call: "macContacts.UpdateLastEdit"

And the contents of this macro are as follows:

MacroName:
UpdateLastEdit

SetValue
Item: [Contacts]![LastEditDate]
Expression: Now()

Condition:
[Contacts]![ID]=[Forms]![frmContacts]![txtID]

I hope this makes sense. "Contacts" is the table name.

But when ever I make a change to the record, nothing happens. The field is
not updated. Any ideas?
 
R

Rick B

Why not just use code in the "before update" event (note that after update
is too late.

Private Sub Form_BeforeUpdate()
LastEditDate = Date()
End Sub



Rick B





I have a form what on the AfterUpdate event is supposed to call a macro.
The point of the macro is simply to update a field value (in a table) to
indicate the last time the record was updated. So, in the AfterUpdate
property in the form's design, I simply call: "macContacts.UpdateLastEdit"

And the contents of this macro are as follows:

MacroName:
UpdateLastEdit

SetValue
Item: [Contacts]![LastEditDate]
Expression: Now()

Condition:
[Contacts]![ID]=[Forms]![frmContacts]![txtID]

I hope this makes sense. "Contacts" is the table name.

But when ever I make a change to the record, nothing happens. The field is
not updated. Any ideas?
 
Top