Applying pkPersonID based on User LogonName

olorin

Registered User.
Local time
Today, 09:43
Joined
Jun 9, 2006
Messages
81
hi people,
I have a module that runs when the Dbase opens.
It grabs the windows UserName and places it in txtUserName on a hidden form.
I also have a table for users:
pkPersonID (primary key autonumber)
First Name
Last Name
UserName
etc

The UserName field is filled-in using VBA when the Admin enters a new user.
When the second name of the user is entered, the AfterUpdate procedure is fired; (Me.UserName.Value = Me.FirstName.Value & "." & Me.LastName.Value)
So that people have the same username as their Windows Logon Name. ie "john.doe"

I would like pointers on how to store the pkPersonID in a field on a data entry form based on the person logged on.

I have tried a couple of ways but to no avail. I am not very conversant with the "WHERE" clause, which is what I think is needed.

The data entry form is for entering time worked on projects.
It has the relevant fields I need to store information, and also has a link to the person who worked on the project (fkPersonID) which is not visible on the opened form.

It's the fkPersonID field I would like to be filled-in, or default to, the pkPersonID relating to the UserName.

Any help, as always is much appreciated
Thanx
 
Like it!
Especially the personalised First Name touch.
Thanx for the advice.
 
I also store the user's first name so I can say "Hi Suzie!".
But Pat - wouldn't you want to use the user's actual name instead of "Suzie" (of course only if their name isn't Suzie) :D (sorry, I just couldn't resist) :)
 

Users who are viewing this thread

Back
Top Bottom