Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Record LastUpdate

Status
Not open for further replies.

TheRealDeal

Technical User
Nov 16, 2001
187
US
Is it possible to see a Property that would tell me when a record was last updated?
 
I think you will need to have a Date/Time field in your table to be able to do that, then assign Now() in the before update event of the form where it's updated.

Roy-Vidar
 
Sounds interesting! Would it have to be updated from the form when I update a record the 2nd, 3rd , ... ?
 
If your form is unbound when you save the update just use someting like LastUpdate=Now(). You don't have to display the last update on the form if you don't want to.

If you wanted to display the time/date it was last updated in a text box then in the just set the textbox=now(), probably in the after update event.
 
The record doesn't have such property, the table does not have any triggers, what's left then are

* field(s) for Created and/or Modified
* usage of the before update event of the form to do the following:

[tt]if me.newrecord then
' only when new record
me!txtCreatedDate.value = now
end if
me!txtCreatedDate.value = now[/tt]

- now, if you're updating through other means too (queries ...), then you'd probably need to include an update on the field there too ...

Roy-Vidar
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top