| | |
Combo lookup arrays in Visual basic.net 2005
Please support our VB.NET advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Dec 2005
Posts: 1
Reputation:
Solved Threads: 0
Hi
I'm using Visual basic.net 2005
I've got a little problem that i help with.
I've created some arrays:
Dim vehicleMake() As String = {"[Select]", "Ford", "Vauxhall"}
Dim vauxhallModel() As String = {"[Select]","Astra", "Corsa"}
Dim fordModel() As String = {"[Select]", "Feista", "Focus"}
added two Combo boxes; cmbVehicleMake & cmbVehicleModel
and added this code to the form
For make As Integer = 0 To 2
cmbVehicleMake.Items.Add(vehicleMake(make))
Next
cmbVehicleMake.SelectedIndex = 0
this puts th vehicleMake array in cmbVehicleMake box with '[Select]' being the fist value.
I now want to put 'model' in to cmbVehicleModel where its related to the 'make'.
Example
if I select 'Ford' then cmbVehicleModel will show Feista, Focus
if I select 'Vauxhall' then cmbVevicleModel will show Astra, Corsa
I then want to be able to select the Model type.
Can anyone help
Ian Wells
I'm using Visual basic.net 2005
I've got a little problem that i help with.
I've created some arrays:
Dim vehicleMake() As String = {"[Select]", "Ford", "Vauxhall"}
Dim vauxhallModel() As String = {"[Select]","Astra", "Corsa"}
Dim fordModel() As String = {"[Select]", "Feista", "Focus"}
added two Combo boxes; cmbVehicleMake & cmbVehicleModel
and added this code to the form
For make As Integer = 0 To 2
cmbVehicleMake.Items.Add(vehicleMake(make))
Next
cmbVehicleMake.SelectedIndex = 0
this puts th vehicleMake array in cmbVehicleMake box with '[Select]' being the fist value.
I now want to put 'model' in to cmbVehicleModel where its related to the 'make'.
Example
if I select 'Ford' then cmbVehicleModel will show Feista, Focus
if I select 'Vauxhall' then cmbVevicleModel will show Astra, Corsa
I then want to be able to select the Model type.
Can anyone help
Ian Wells
![]() |
Other Threads in the VB.NET Forum
- Previous Thread: VB 2008 Express help
- Next Thread: Status Bar in Web Browser control
| Thread Tools | Search this Thread |
.net .net2008 2005 2008 access account arithmetic array basic beginner bing browser button buttons center check code crystalreport cuesent data database datagrid datagridview date datetimepicker designer dissertation dissertations dissertationtopic dropdownlist excel fade file-dialog filter forms ftp generatetags google hardcopy html images input insert intel internet mobile monitor net networking objects open output panel passingparameters pdf picturebox picturebox1 port position print printing problem project save searchbox searchvb.net select serial settings shutdown soap sqlserver survey table tcp temperature text textbox timer timespan toolbox transparency trim update user vb vb.net vb.netformclosing()eventpictureboxmessagebox vb2008 vba vbnet visual visualbasic.net visualstudio.net visualstudio2008 web winforms wpf wrapingcode year





