Automatically record date/time record is updated

D

Donna

In Access 2000, is there a way to record the time in a table when the form is
opened?

Thanks
 
V

Van T. Dinh

If you can ensure all data entries / edits are done through the Form and not
DatasheetView of the Table / Query, you can use the Form_BeforeUpdate to
record the "DateTimeUpdated" in conj. with the edit.

HTH
Van T. Dinh
MVP (Access)
 
D

Donna

Not to sound stupid, but no date appears. Am I missing something? I'm using
Access 2000

Thanks,
Donna
 
V

Van T. Dinh

You have to create a datetime Field "DateUpdated" (or whatever name you want
to use for the Field). In the BeforeUpdate Event of the Form, use:

Me.DateUpdated = Now()
 
D

Donna

ok....so assume I'm a moron...

I created a table field entryin my main table: "DateUpdated"

I right clicked the main form properties button (my main form has many
subforms), I typed in me.dateupdated = Now() in the MAIN form beforeupdate
property.

I still cannot see/record the update date in my table...what little step am
I missing?

Thank you so much...
Donna
 
J

John Vinson

ok....so assume I'm a moron...

I created a table field entryin my main table: "DateUpdated"

I right clicked the main form properties button (my main form has many
subforms), I typed in me.dateupdated = Now() in the MAIN form beforeupdate
property.

I still cannot see/record the update date in my table...what little step am
I missing?

What you need to do is click the ... icon by the BeforeUpdate
property; invoke the Code Builder; and insert this line between the
Sub and End Sub lines which Access will provide.

*NOT* obvious until the third or fourth time you need to do it!

John W. Vinson[MVP]
 
Top