I have created a database with a front end and back end. Each user has their name listed in a drop down box on the menu (the users' names are stored in tblUsers).
Now, everytime a user opens the database, they are presented with the menu (frmMenu) and they select their name from the drop down box (an unbound combo box named "User"). They then click a button which runs a query on a master table and presents them with only their workload in a form (frmWorkload).
I have stored the Windows username and the user's full name in tblUsers (fields "SurveyorUsername" and "SurveyorName". I would like to have the menu automatically look up the SurveyorUsername using the VBA:-
Environ("Username")
and then compare that to the values in tblUser and display the SurveyorName in the "User" box:-
For example, John Brown opens the database. The menu pulls his Windows username as "johnb" then looks for that value in tblUsers and select the user's full name "John Brown" and put that in the unbound combo box "User" as a default value.
Can you help?
Now, everytime a user opens the database, they are presented with the menu (frmMenu) and they select their name from the drop down box (an unbound combo box named "User"). They then click a button which runs a query on a master table and presents them with only their workload in a form (frmWorkload).
I have stored the Windows username and the user's full name in tblUsers (fields "SurveyorUsername" and "SurveyorName". I would like to have the menu automatically look up the SurveyorUsername using the VBA:-
Environ("Username")
and then compare that to the values in tblUser and display the SurveyorName in the "User" box:-
For example, John Brown opens the database. The menu pulls his Windows username as "johnb" then looks for that value in tblUsers and select the user's full name "John Brown" and put that in the unbound combo box "User" as a default value.
Can you help?