My Assistant
![]() ![]() |
|
|
Dec 6 2005, 01:16 PM
Post
#1
|
|
|
New Member Posts: 2 From: Canada |
I am trying to figure out an easy way to show a "last updated" timestamp (ideally with both date and time) on my forms. So far, my current solution works as long as the data is updated *only* from within forms. When a table is used to modify a record, that record's "Date Updated" field (something I created) does not reflect the correct date/time.
The solution I use now is using AfterUpdate for each form element to update this field. Here's an example: CODE Private Sub Guest_First_AfterUpdate() [DateUpdated] = Date End Sub Does anyone know of a way to reliably track changes to individual record regardless of whether the change was made from a table or form? I would really appreciate some assistance. |
|
|
|
Dec 6 2005, 01:22 PM
Post
#2
|
|
|
UtterAccess VIP Posts: 31,413 From: NC, USA |
Hi,
welcome to UA forums. NO ONE should directly make changes to records in tables. Your users should not even be able to get to the table level. Tables/database window should be hidden and your users should use a userinterface (forms/reports) provided by the developer to do what they need to and are allowed to. To hide the database window go to tools--startup...uncheck show database window on startup and select a form to show instead. This is normally a splashscreen which redirects to a menu/switchboard or the menu directly. To get back in as the developer hold down shift while starting the db. BTW...if you want to use date and time then use NOW() instead of Date(). HTH Good luck |
|
|
|
Dec 6 2005, 01:25 PM
Post
#3
|
|
|
New Member Posts: 2 From: Canada |
I know that normally the table would be hidden. However, in this case it must remain open to edits. This is a small DB with only about 20 fields and 1000 records ... and, as there aren't many users working on it, there's less potential for corruption or errors. Is there a way to keep track of updates in this kind of scenario?
|
|
|
|
Dec 6 2005, 01:28 PM
Post
#4
|
|
|
UtterAccess VIP Posts: 31,413 From: NC, USA |
Hi,
why does it need to "remain open to edits"? I can't really think of a possible answer to this as everything can be presented through forms for your users. HTH Good luck |
|
|
|
Dec 6 2005, 01:38 PM
Post
#5
|
|
|
UtterAccess VIP Posts: 5,200 From: Denver, Colorado [USA] |
Access/Jet does not offer TRIGGERS, so the only way to ensure this field gets updated is to do it in a form and ONLY allow access to the data through a form or forms.
I, too, cannot think of any possible reason a table "must" remain open to direct edits by users. That's bad design, no matter what DB you are using or how many users are in it. Beyond that, you will have lost the integrity of your LASTUPDATED field if you allow it. |
|
|
|
![]() ![]() |
|
Go to Top · Lo-Fi Version | Time is now: 19th June 2013 - 12:57 AM |