Help with combobox and database

GOD___
11-15-2000, 10:43 PM
Ok, I am have a dbcombo box linked to a "names" field in my database. The combo box is populated ok but when I select a name in the combobox the information in the textboxes linked to the database do not change. I read further down someone saying to use just normal comboboxes, I can do that, it's no problem, I can populate a normal combobox with the names, but how do I have it so that when I click on the name the data in my text boxes changes correspondingly. The names in the comobo box will be changing frequently during run time. I'm just a high school student, so I'm not that knowledgable in this, and neither is my teacher.(maybe less so then me)

Q...
11-18-2000, 05:25 AM
Frankly, your teacher needs a new job.

A combo box has an on_click() event. In that event you should put some code makes an SQL statement along the lines of "SELECT * FROM MyTable WHERE Name = " & MyCombo.Text .

Then when you query the database with this you will get a recordset full of the relevant data which you can then set each of your textboxes text property to the corresponding, relevant field in the recordset.

Q...

GOD___
11-21-2000, 10:03 PM
Thanks alot, for responding to my post.
I ended up coming to my senses and figuring it out for myself.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum