DBCombo changes = Recordset changes

04-18-2004, 12:23 AM
How can I make a DBCombo Box change a recordset when it is changed?

For example, I've got a program that runs from a Database with 3 fields; Name, URL, Description. The names are in a cbo box, and the rest are in labels. I want the cbo box to change the recordset to the one that they click on from the cbo box. I've posted this once before, and searched EVERYWHERE. I can't find anything that helps. I tried using search to find the correct fields but it doesn't work. I'm using a simple Data control. Help please, I've tried to find the answer for a week!!

04-18-2004, 07:07 PM
i would advise ditching the data control, and use ADO code instead. in summary, you would write code to do the following:

1. in the form Load event, populate the combo box from the database, using the Connection object and Recordset object.
2. in the Click event for the combo box, populate the label controls depending upon the data the user has selected from the combo box.

do some research on ADO, using the Connection object to open a database, using the Recordset object to open a table, and using the methods of the Recordset object to reposition the recordset to the record you want.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum