I am working on a form in my DB that will pull user information based on a user ID. Everything is working, except that I cannot get my combo boxes to populate unless the associated list box item is selected. Let me explain further.
I am currently running this code to pull the user's location information from the table:
Me.lbox_LocOut.RowSource = "SELECT tbl_Users.Location " & _
"FROM tbl_Users " & _
"WHERE ((tbl_Users.[Primary_User_ID])='" & Me.txt_SearchUser & "');"
That works fine. I am running a similar piece of code in a combo box to pull a list of applications to select from that is based on what location is selected. This code is set to run as lbox_LocOut_AfterUpdate().
Me.cbox_AppOut.RowSource = "SELECT tbl_Applications.Application_Name " & _
"FROM tbl_Applications " & _
"WHERE ((tbl_Applications.[Location_Name])='" & Me.lbox_LocOut & "');"
This code does work, but only if I click into the "lbox_LocOut" field once the information has loaded. I would like to have the combo box update automatically without having to click into the listbox.