I want to make it so that when the user selects an item in one box, which displays all items in a certain column, the other box would automatically change to another item in a set column on the same row. Any tips on how to do this?
Say you have two combo boxes (cbo1 and cbo2). After making a selection from cbo1, the potential values in cbo2 should change. To do this, in the <AfterUpdate> event property of cbo1, type the following: Forms!frmMyForm!cbo2.Requery or you could type this: me.cbo2.Requery.
I did what you said, even made a new form with combo boxes that matched your examples, and it didn't work correctly. When I select an item in the first combo box, the second remains blank. What could I have done wrong that would have caused this?
The row source for the first combo box is:
SELECT [Sheet1 Query].[SKU] FROM [Sheet1 Query];
The row source for the second combo box is:
SELECT [Sheet1 Query].[Description] FROM [Sheet1 Query];
Try this for the row source of your second combo box: SELECT [Sheet1 Query].[Description],[Sheet1 Query].[SKU]FROM [Sheet1 Query]
Where [Sheet1 Query].[SKU]=Forms!frmYourForm!cbo1
This will tie the two combo boxes together, and using the requery command in the after update event of cbo1 should repopulate the potential values for cbo2.
Let's assume I have a db with two tables. tblMake has the following field: Make. tblModel has the following fields: Make;Model.
Next, I have a form (frmAuto) with two combo boxes (cboMake and cboModel). The record source for cboMake is: SELECT [tblMake].[Make] FROM tblMake;
The record source for cboModel is: SELECT [tblModel].[Make], [tblModel].[Model] FROM tblModel WHERE ((([tblModel].[Make])=[Forms]![frmAuto]![cboMake]));
The possible values displayed in cboModel is directly related to cboMake. The two combo boxes are tied together by Make.
opps i think i misread the first post. Are you trying to make it like a menu?? For example the Start button in windows, then you select "All Programs", then you select "Assecories"???
I thought you were just trying to get 2 combo boxes to have the same value.....sorry
well, i dont know if its necessarily a menu. But what im trying to do is: for instance, whenever a members name(member_id) is selected in one combo box, the companys(company_name) that he has worked for will be the only ones available in another combo box. So that the user doesnt have to scroll through every company, whether or not the member has worked for them or not.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.