Hi,
I have login form created which I login with user name. I want to display the same login name in a field of a form after I login.
Can someone help me on this plz.
Many thanks,
PK
Hi,
I have login form created which I login with user name. I want to display the same login name in a field of a form after I login.
Can someone help me on this plz.
Many thanks,
PK
Assign it to a global variable.
Its almost like I know what I'm doing. No, but seriously. If that value is held as a global variable once logged in, you can use it throughout your database.
I'm no expert and I probably wont be much use beyond this, but if you're stuck at least you have something to look at now.![]()
It can be as simple as minimizing the login form after logging in, and using-- Forms![YourLoginForm]![YourUsernameTextBox] wherever you want that value.
If FormA is your login form, and FormB is your form you want to display your login username in the textbox named MyTextbox, set the MyTextBox control source " =Forms!FormA![YourUsernameTextBox]"
we use code like this. the Login button code has:
cboEmployee is your usename.Code:TempVars.Add "EmpCode", Me.cboEmployee.Value DoCmd.OpenForm "Switchboard"
on the "switchboard" we created a text field with the control source =[TempVars]![EmpCode]
Hope that helps!