I have an Access database I'm working on which has a simple login system consisting of a drop down (combo) menu to select the username, a password field and a users table.
Inside the users table, I'm storing the username, password and the first name of all the users. I've managed to get my login form working, but I'd like the user's first name to be displayed in a text box on the next form.
I've managed to get the user's ID number, and display it in a text box, but I haven't been able to get the user's first name.
Does anyone know of a simple way to display the user's first name in a text box, keeping in mind I'll have several forms where I wish to display the user's first name?
Thanks
As your description says you are using a ComboBox, I am sure the RowSource would be.
The ComboBox properties are Bound Column - 1, Column Count - 2, Column Widths - 0cm;2.5cm (something like this, but 0cm for sure). Now all you have to do is, make the following changes, RowSource :
ComboBox properties are Bound Column - 1, Column Count - 3, Column Widths - 0cm;2.5cm**;0cm**
Then, you can simply use the OpenArgs method where you can pass the ComboBoxes Column 3. like,
Then Finally in the Second Form's On Load event you can use.
Hope this helps.
If you are going to use the user name information in several forms, perhaps you may consider using session variables to access the information. Its a bit more cleaner than passing it from object to object as an argument.