944,098 Members | Top Members by Rank

Ad:
  • VB.NET Discussion Thread
  • Unsolved
  • Views: 2294
  • VB.NET RSS
Dec 5th, 2007
0

Combo lookup arrays in Visual basic.net 2005

Expand Post »
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
Reputation Points: 10
Solved Threads: 0
Newbie Poster
irwells is offline Offline
1 posts
since Dec 2005

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in VB.NET Forum Timeline: VB 2008 Express help
Next Thread in VB.NET Forum Timeline: Status Bar in Web Browser control





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC