Graham-
It has always been the case (with the exception of SendKeys in some cases) that code - either macros or VBA - cannot cause an event to fire. It was designed that way to avoid looping.
John Viescas, Author
Microsoft Access 2010 Inside Out
Microsoft Access 2007 Inside Out
Microsoft Access 2003 Inside Out
Building Microsoft Access Applications
SQL Queries for Mere Mortals
(Paris, France)
On Feb 11, 2015, at 10:44 PM, 'Graham Mandeno' graham@mandeno.com [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:
Hi Bill
I think you mean Form_BeforeUpdate don't you? I would think that updating the record in AfterUpdate could cause an endless loop J
Cheers,
Graham
From: MS_Access_Professionals@yahoogroups.com [mailto:MS_Access_Professionals@yahoogroups.com]
Sent: Thursday, 12 February 2015 09:29
To: MS_Access_Professionals@yahoogroups.com
Subject: [MS_AccessPros] Re: Use of update to "LastUpdated" field
Sent: Thursday, 12 February 2015 09:29
To: MS_Access_Professionals@yahoogroups.com
Subject: [MS_AccessPros] Re: Use of update to "LastUpdated" field
Robin
Me.Dirty will not be true in the AfterUpdate event. "Dirty" means a record is in a state of being edited. What I would use is:
Private Sub Form_AfterUpdate()
lastUpdate = Date()
End Sub
The AfterUpdate event only fires after a record has been updated.
Regards,
Bill Mosca, Founder - MS_Access_Professionals
Microsoft Office Access MVP
My nothing-to-do-with-Access blog
__._,_.___
Posted by: John Viescas <johnv@msn.com>
| Reply via web post | • | Reply to sender | • | Reply to group | • | Start a New Topic | • | Messages in this topic (7) |
.
__,_._,___
Tidak ada komentar:
Posting Komentar