ACC: Macro to Enter Date When a Record Was Last ModifiedID: Q96103
|
Novice: Requires knowledge of the user interface on single-user computers.
This article shows you how to write a macro that will place the current
date into a LastModified field in a table each time that a record is
modified. You can use this method when you are editing records on a form.
When you use a form to edit records, you can date stamp the record by
attaching a macro to the BeforeUpdate property of the form. This
example uses the Customers table in the sample database Northwind.mdb (or
NWIND.MDB in versions 1.x and 2.0).
Table: Customers
------------------------
Field Name: DateModified
Data Type: Date/Time
Macro Name Action
------------------------------
LastModified SetValue
LastModified Actions
--------------------
Item: [DateModified]
Expression: Date()
Form Name: Modify Customers
---------------------------
ControlSource: DateModified
ControlSource: CustomerID
ControlSource: CompanyName
ControlSource: Address
Keywords : kbusage McrActn
Version : 1.0 1.1 2.0 7.0 97
Platform : WINDOWS
Issue type : kbhowto
Last Reviewed: March 19, 1999