If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Combo Box
I've a form namely "Transection" and in that form there are two combo
boxes. One of them is listing all the Brand names (Motorola, LG, TCL etc...) and the other one listing all the model numbers for those brands. Both are getting information from different tables for brand and model numbers independently. Now. in the form when I select "Motorola" brand, the other combo box with the model numbers should show only a list of selected brand's model numbers. How can I have this done? Hope my poor english is enough for you to understand my query and awaiting for your help urgently, please. |
#2
|
|||
|
|||
Combo Box
Sazed wrote:
I've a form namely "Transection" and in that form there are two combo boxes. One of them is listing all the Brand names (Motorola, LG, TCL etc...) and the other one listing all the model numbers for those brands. Both are getting information from different tables for brand and model numbers independently. Now. in the form when I select "Motorola" brand, the other combo box with the model numbers should show only a list of selected brand's model numbers. How can I have this done? Here's a short article that explains it. http://www.mvps.org/access/forms/frm0028.htm -- Marsh MVP [MS Access] |
#3
|
|||
|
|||
Combo Box
doesnt work! after inputing the suggested following code it askes for
"peremeter value" Private Sub cbxCombo1_AfterUpdate() Dim strSQL As String strSQL = "Select " & Me!cbxCombo1 strSQL = strSQL & " from Categories" Me!cbxCombo2.RowSourceType = "Table/Query" Me!cbxCombo2.RowSource = strSQL End Sub what to do now? |
#4
|
|||
|
|||
Combo Box
Sazed wrote:
doesnt work! after inputing the suggested following code it askes for "peremeter value" Private Sub cbxCombo1_AfterUpdate() Dim strSQL As String strSQL = "Select " & Me!cbxCombo1 strSQL = strSQL & " from Categories" Me!cbxCombo2.RowSourceType = "Table/Query" Me!cbxCombo2.RowSource = strSQL End Sub You used the wrong part of the article. Then second part explains that the model combo box's RowSource query should use a criteria that refers to the brand combo box. SELECT modelname FROM models WHERE brand = Forms!Transection.cboBrands Don't forget the Requery code in both the brands combo box's AfterUpdate event and in the form's Current event. Be sure to replace the names I used with the ones you have in your form and double check their spelling. -- Marsh MVP [MS Access] |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Hidden Power of the Combo Box | JethroUK© | New Users | 2 | October 24th, 2005 09:18 AM |
Hidden Power of the Combo Box | JethroUK© | Using Forms | 2 | October 24th, 2005 09:18 AM |
Displaying Additional Columns in Access Form | Roxanne | General Discussion | 3 | September 20th, 2005 06:50 PM |
COMBO BOX transfer of info | Philip from Malta Europe | Using Forms | 0 | July 6th, 2005 09:52 AM |
Combo box value determined by the value of another combo box | LouD | General Discussion | 8 | July 9th, 2004 08:45 PM |