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!

Log/Track Changes Made by Users to Tables 1

Status
Not open for further replies.

duhu

Technical User
Joined
Feb 3, 2009
Messages
5
Location
GB
Hi guys, first of all see my previous post:

Would someone be able to tell me how I can have the username in the "tbl_loginLOG" also entered into a field called "UserEnt" in a form called "frm_history".
This form is used to record the movement of laptops in and out of a cupboard and i would like the name of users who input entries in the history table also shown. At the moment the form has the "Information, Date & Time" fields displayed. I would like to have the username of the most recent logged on user to populate the "UserEnt" field in this form/table.

SEE:
(shows the query from which frm_History is derived, to enter new information)

(shows The history form, click on "Add Note" which opens up frm_History to make a new entry)
 
Try this:

On the OnBeforeUpdate Event, set UseEnt to CurrentUser
 
set UserEnt to CurrentUser? That does not work, is there an error with your syntax perhaps?

Shot in the dark i even tried:
Me.UserEnt = Queries!qry_UserLOG!User

Didn't work too.
 
Using CurrentUser()will only get you the current user that is logged into the DB(User, Admin). This link will help you if you are not using the DB in user setting. It will grab the current user logged into the computer as well as the computer name.

 
Me.UserEnt = CurrentUser() 'logged on to database

or

Me.UserEnt = Environ("username") 'network logon name
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top