Combo lookup arrays in Visual basic.net 2005

Please support our VB.NET advertiser: Intel Parallel Studio Home
Reply

Join Date: Dec 2005
Posts: 1
Reputation: irwells is an unknown quantity at this point 
Solved Threads: 0
irwells irwells is offline Offline
Newbie Poster

Combo lookup arrays in Visual basic.net 2005

 
0
  #1
Dec 5th, 2007
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
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the VB.NET Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC