Please help me!!!

delegence

New Member
Joined
Mar 10, 2004
Messages
1
First off I would like to say hello to all. I would like to thank you for all your help in the past. My question is I am trying to use the current user Id to populate a text box and then I want to use that to update another text box and display the first name from a table named staff list.

Staff list contains the network id and the persons first and last name. If this is possible please help me. Thank you in advance
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
Just to clarify: do you want to place the CURRENT user's ID on the form, or do you want it so that they SELECT an ID and the other stuff populates the form?

If it's the first, then something like
[txtID] = UCase(Environ("UserName")) will do the job on a NT / Win 2K network, where txtID is the text box that you want to display the result. NOTE: This should be an UNBOUND control.

If it's the second option you want, consider using a Combo box. You could set up its SQL statement to have ID, FirstName, LastName, and other fields that you need.
Then add this code to the AfterUpdate event of the Combo:
[txtAnotherID] = Combo1.Column(0)
[txtFirstName]=Combo1.Column(1)
[txtLastName]=Combo1.Column(2)
etc.

You'd need to adjust control names to suit your situation.

Denis
 
Upvote 0

Forum statistics

Threads
1,221,831
Messages
6,162,252
Members
451,757
Latest member
iours

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top