vb.net - How do i generate a textbox with price when vehicle model is selected from a combo box -


i'm new vb.net programming , have problem car showroom management project.

i have car details microsoft access database have id (primary key auto generated access database) , corresponding details vehiclename, vehiclemodel, vehicle color... price etc.

i have 2 combo boxes:

  1. vehicle company names
  2. vehicle models of corresponding company names

now have populated 1st combo box vehicle company names audi, bmw ect. got code display vehicle model names in 2nd combobox when 1 of company name selected 1st combobox.

now problem have textbox , want generate price automatically when vehicle model selected 2nd combo box! how do in simple way?

this how populated second combo box upon first:

if comboboxcarcompany.selecteditem = "audi"     dim cn new oledbconnection("provider=microsoft.ace.oledb.12.0;data source=c:\users\wilson\documents\visual studio 2012\databases\skodadb.accdb")     dim da new oledbdataadapter()     dim dt new datatable()     cn.open()     da.selectcommand = new oledbcommand("select * auditable", cn)     da.fill(dt)      comboboxcarmodel.datasource = dt     comboboxcarmodel.displaymember = "vehiclemodel"     comboboxcarmodel.valuemember = "id"     cn.close() end if 


Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -