Ask a Question related to Microsoft Access, Design and Development.
-
Allen Browne #1
Re: Automatically adding date/time stamp to an edited record
To record just the date/time the record was created:
Add a new Date/Time field to your table, and set its Default Value property
to:
=Now()
To record the date/time the record was last updated, add a field to the
table named (say) "UpdatedOn", and put this code into the BeforeUpdate event
procedure of the form where records are edited:
Private Sub Form_BeforeUpdate(Cancel As Integer)
Me![UpdatedOn] = Now()
End Sub
To record a complete history of who edited/inserted/deleted which record
when, recording both the old and new values each time, see:
Audit Trail - Log changes at the record level
at:
[url]http://users.bigpond.net.au/abrowne1/AppAudit.html[/url]
--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - [url]http://allenbrowne.com/tips.html[/url]
Reply to the newsgroup. (Email address has spurious "_SpamTrap")
"TylerT" <cwttwitch@yahoo.com> wrote in message
news:69cf01c35844$f1979750$a001280a@phx.gbl...> I am trying to find some information on how I can have the
> date and time stamp added to a record that a user edits in
> a database. I need to be able to keep track of when the
> record was modified without requiring the user to enter
> this information. This is important for billing purposes
> and for a call center. Any help would be great.
>
> Tyler
Allen Browne Guest
-
Date and Time stamp on photo: how to remove
I took some pictures in Europe this summer with my Coolpix 3100 and for about 20 of them had the date and time stamp turned on (printed in Orange).... -
Time/Date Stamp on Note
Is there a way to turn off the time/date stamp on the Notes feature in Acrobat 5.0? -
Make DB2 UDB Date and Time Stamp Consistent With Win2000
Hello, As somebody fairly new to DB2.. I am looking to migrate a V6 (No laughter please, it was a sandbox system hardly used at all)... -
Time Stamp on a record
I have a subform within a form. When a user creates a new record in the subform, I would like to have the date/time automatically stamped on that... -
Date and Time stamp
Without knowing what code/expressions/setup you're using, I would guess that the references on the Win 95 PCs are missing some library. Open up... -
Sandra Daigle #2
Re: Automatically adding date/time stamp to an edited record
Hi Tyler,
Add a date field to the table (Every table you want to do this on). Also add
that field to the form (or at least to the form's recordsource) then in the
form for that table add code in the BeforeUpdate event to update that field:
me.LastEdit=now()
or
me.LastEdit=date
Use now() if you want a date and timestamp, Date if you want date only.
In my applications I also log the Username of the user who last updated the
record. If you have implemented Access Security you can easily get this
information using the CurrentUser function
me.LastUser = CurrentUser()
--
Sandra Daigle
[Microsoft Access MVP]
For the benefit of others please post all replies to this newsgroup.
TylerT wrote:> I am trying to find some information on how I can have the
> date and time stamp added to a record that a user edits in
> a database. I need to be able to keep track of when the
> record was modified without requiring the user to enter
> this information. This is important for billing purposes
> and for a call center. Any help would be great.
>
> TylerSandra Daigle Guest



Reply With Quote

