Function to convert CurrentUser() to actual name (1 Viewer)

Mitch_____W

Mitch
Local time
Today, 16:57
Joined
Oct 31, 2001
Messages
73
I have a table named "Delegators" which has 2 fields (Employee Name; UserID). I am trying to use code behind an 'After_Update' event of a checkbox named "RFP" on a form named "Employee Authorization Info Form" which is bound by another table named "Employee Authorization Info" to get the Employee Name of the CurrentUser() using the "Delegators" Table.

Can I make a function to convert the CurrentUser() (Which would be the 'UserID') to its respective 'Employee Name' from the "Delegators" Table?

If so, I am at a loss here...

Ultimately, This 'RFP' checkbox has 2 Textboxes adjacent to it on the form. The first of which is the 'RFP Authorized By' textbox and the second is the 'RFP Authorization Date' textbox. When the CurrentUser() checks the 'RFP' checkbox I need the 'RFP Authorized By' textbox to be updated with the 'Employee Name' associated with the CurrentUser() in the "Delegators" Table.

Wow! If you aren't confused after reading this, then I am really impressed since I think I am confused after reading it myself!!!

Any suggestions would be greatly appreciated...

Mitch
 

LynnaM

Registered User.
Local time
Today, 21:57
Joined
May 11, 2001
Messages
19
I basically have the same set up. I have a table that has all the employee info (user name and ID). I use a query to get my current user(), this query shows both the strName and userID.

On my form I have a hidden text box which uses =DLookup("[strName]","qryUserID")
I then pass the value [strName] to the text box that I need it in by setting the default value to =[strName]. I hope this might give you a start.
 

Mitch_____W

Mitch
Local time
Today, 16:57
Joined
Oct 31, 2001
Messages
73
I figured it out... Thanks for pointing me in the right direction (via DLookup)...

I will post the actual code I ended up using later. I am at home now and don't have the code on my home pewter...

Mitch
 

Users who are viewing this thread

Top Bottom