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
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