Tad bit of combo box newbie help, please!

  • Thread starter Thread starter moonbear.greenoak
  • Start date Start date
M

moonbear.greenoak

I know I should have been able to find this in a book or in this or
another group, but I've been looking for hours and trying to get it to
work for hours, but my mind is just not getting around this thing. I'm
using VB.NET 2005

The setup is very simple. I have an Access db with one table (tblCar)
containing three fields (CarID, CarName, CarDesc). At formload, I
successfully pull all records for all fields and populate the form,
txtCarID, cboCarName and rtfCarDec all show the info from the first
record pulled and cboCarName has all the records from that column. The
only think I cannot figure out is how to change txtCarID and rtfCarDesc
when I select a new value in cboCarName. I'm pretty sure I need to add
the code to do it to the Sub cboCarName_SelectionChangeCommitted, but I
cannot figure out what the code should be.

Any help would be greatly appreciated.

--MoonBear
 
...
Any help would be greatly appreciated.

nevermind, I finally figured this out. I now have to figure out how to
use the text typed into the combo box as part of the dataset.update
because right now when save anew record, that is the only thing that
doesn't save.
 
Also you could use the DataTable.Select("column = value") method to get
the row selected in the combo box, then set the values of the other
controls.

Hope this helps some

Izzy
 
Thanks for the reply, but the values for the other controls are stored
in the rows of the dataset. ANyways, I got that figured out, and got my
other question figured out as well so now the app will display all the
fields by row synced with the combo box and will save a new record,
refresh the dataset and forward to the record just created.

I've just got to do some more formatting code, like lists, and
justification in the rtfCarDesc and it'll be good. Printing comes after
that, but I'll not bore the NG with all that stuff.

--MBGO
 
Back
Top