Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Personalize the site

Status
Not open for further replies.

spudmizer

Technical User
Jul 25, 2002
35
0
0
US
Ok I have a table of users
they login in using password
I want to use a more casual name when they are on the form
Example Login Name is jhitesman I don't want jhitesman everywhere I want "Jason" or "Jason Hitesman"
I tried just adding it to the local user list where the password are kept naming it cname, so how to I tell my text field on my forms if user is jhitesman then display cname or so on !!!
 
If you are going to use this Cname in multiple places, then I would suggest creating a global variable (gCname as string) and setting it to cname when you check the logon password. You can then assign gCname to the various text boxes.

Ken
 
1. Type this in the declarations section of a module:

Global gCName as String

2. When you check the username and password, assign the value of the cname field to gCName:

gCName = rs("cname")

3. Put a unbound textbox (txtUserName) on each form where you want to display the name. In the On Open event of the form put gCName into that unbound textbox:

txtUserName = gCName

Ken

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top