After update question

L

ljg

I have a hidden field on a form [df3] and want to update this field with the
current date once a record is changed.

I have added to the forms AfterUpdate:

Private Sub Form_AfterUpdate()
Me.df3 = Now()
End Sub

But this does nor work, can anyone tell me the correct syntax for this
please.
 
A

Allen Browne

Use Form_BeforeUpdate.

There is no point dirtying the record again *after* it has been saved
(Form_AfterUpdate) so it needs to be saved again, which will trigger
Form_AfterUpdate again, which ...
 
K

Klatuu

Use the Before Update event. the After Update is too late, the record
changes have already be applied.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top