Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
G'day , i am trying to workout how to change the contence of a combo box in referance to what was in the previous box
IE if someone selects dell from 1 combo box the next box will have the model of dell systems and if they select compaq they only get the compaq models in the next combo box
any help would be apreicated
Cheers
Glen

Hello,
I did something along those lines a while ago but lost my code. First you need to make an access database with the two fields (manufacturer and ID, for the one table, and model and ID for the other table). Then open the database for the manufacturer do something like:
cboManufacturer.List(cmbManufacturer.ListIndex)= CurrentManufacturer
If currentMaunfacturer rs!Manufacturer Then
rs.MoveNext
End IfCurrentID = rs!ID
Then open the Model table
Do While rs.EOF = False
If currentIDrs!ID AND rs.EOF = False then
rs.MoveNext
End Ifrs!Model = cboModel.List(cmbModel.ListIndex + (cmbModel.ListCount))
Loop
I think that's how I did it. Try it out and let me know what happened.

something likeafter update of combo one
if combo1.value = "dell" then combo2.rowsource = "dell specs"
refreshthat means if dell is selected in combo 1 then combo 2 source should change to x and refresh just refreshs the data to display correct stuff in combo 2

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |