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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how can i document who last changed a record and at what time 1

Status
Not open for further replies.

lewie

Technical User
Joined
Jan 17, 2003
Messages
94
Location
US
I need to add a last user and last time changed to my db.
I think when they update a record i can just let [lastdate] = date but how do i document the current user.
Thanks
Lewie
 
First you need to add a couple of fields to your table and them add them to your form (they can be invisible if you like)

Field name in table Control name on form
strModifiedBy (test) txtstrModifiedBy
dtmModifed (Date) txtdtmModified

Then in the BeforeUpdate event of the form, do this

txtstrModifiedBy = CurrentUser
txtdtmModified = Now
 
Thanks.
What does beforeupdate do.
If i want to know the last person to change it shouldn't i use on dirty.
Lewie
 
for a more robust soloution see faq181-291. be aware that all soloutions to this require that ALL changes be accomplished through BOUND FORMS, and the implementation of Ms. A. Secutity.




MichaelRed
m.red@att.net

Searching for employment in all the wrong places
 
Thanks alot
Lewie
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top