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 John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to Capture your Database User's Name

Status
Not open for further replies.

CoolFactor

Technical User
Dec 14, 2006
110
US
I was wondering if anybody knows how to capture
the Database User's Name in a text box on a Form.
I have my table with my Users along with their username and
password.

I have a logon form that I created with a combo box and a
text box that capture my Users name and password.
 
The database user's name is CurrentUser

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
I don't think you understood what I was saying. What I mean is, I am trying to capture username in from the Logon
Form in another Form within a textbox.
 
Like this ?
Forms![another Form]![textbox] = Forms![Logon Form]![username control]

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
I inputted this with a few changes into the control source of the text box and it doesn't seem to work.

Forms![another Form]![textbox] = Forms![Logon Form]![username control]

Here is what I inputted:
Forms![frm_Main]![Text145] = Forms![frm_Logon]![Combo0]
 
I gave you VBA code.
As ControlSource you may try this:
= Forms![frm_Logon]![Combo0]

Note: the logon form must be open.

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
How are ya CoolFactor . . .

Hmmmm . . . post what you've tried! . . .

Calvin.gif
See Ya! . . . . . .

Be sure to see FAQ219-2884:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top