**calling fields**

MS_Access_Amature

Registered User.
Local time
Yesterday, 23:11
Joined
Nov 10, 2010
Messages
56
On my switchboard form i have a listbox with various employees.
When the user clicks his name on the listbox then hits the view my hours button
a user access form pops up (basically a login screen).
what i'm trying to do is, whatever name the user clicked on the listbox on the switchboard to show up in the username textbox on the user access form??
 
In the After Update event of the listbox, put this (after the code to open the login form):
Code:
Forms!YourLoginFormNameHere.YourTextBoxNameHere = Me.ListBoxNameHere

And if the listbox has more than one column (including hidden), and the name is in the second column you would use

Code:
Forms!YourLoginFormNameHere.YourTextBoxNameHere = Me.ListBoxNameHere.Column(1)

1 for field 2, 2 for field 3, etc because they are zero based.
 

Users who are viewing this thread

Back
Top Bottom