StayAtHomeMom
Technical User
Hello all,
I have a form in my DB with several list boxes (where the sources are each simple Select queries from a table). The user clicks on selections within each list box, then clicks a command button that runs VB code to create a report based on their selections.
I want to add a new list box, whose displayed contents will be dependent on the selection in the list box immediately to the left of the new box. When the form first opens, that new list box would be blank, and I'm guessing what will spur the display action will be the On_Exit event from the list box to the left, when the user makes a selection.
I'm confused what the syntax would be for the source of the new list box. It will be a query of a table, with the "where" clause will be what was selected by the user.
I guessed at something like this for the row source:
SELECT BranchID.Br_Name
FROM BranchID where BranchID.DistName=Me!Distributor.Column(0,1)
Of course it didn't work, but am I close? THANKS!
I have a form in my DB with several list boxes (where the sources are each simple Select queries from a table). The user clicks on selections within each list box, then clicks a command button that runs VB code to create a report based on their selections.
I want to add a new list box, whose displayed contents will be dependent on the selection in the list box immediately to the left of the new box. When the form first opens, that new list box would be blank, and I'm guessing what will spur the display action will be the On_Exit event from the list box to the left, when the user makes a selection.
I'm confused what the syntax would be for the source of the new list box. It will be a query of a table, with the "where" clause will be what was selected by the user.
I guessed at something like this for the row source:
SELECT BranchID.Br_Name
FROM BranchID where BranchID.DistName=Me!Distributor.Column(0,1)
Of course it didn't work, but am I close? THANKS!