PDA

Click to See Complete Forum and Search --> : Question on displaying data in a form


JasonS
Aug 10th, 1999, 07:30 PM
I'm new to VB and need some advice on how to structure a form that is viewing data from an Access 97 database. The form is a questionaire that the user needs to select a response from a drop down ComboBox.
I have 2 tables,questions and responses, that are linked by two fields,QuestionGrp and QuestionId. I want the user to scroll through the questions and have the ComboBox refresh with the proper data.
The reponse table has multiple rows that the user can choose from and their reponse will be recorded in a separate table.

Any advice is appreciated.
Thanks

david1
Aug 10th, 1999, 08:58 PM
I guess the answer depends on which version you have. If you have vb6 then you may just use the Data form wizard and ADO. You need to add the ADO reference to you project.

Now the first question I would ask is which is the primary - foreign key relationship on the tables? It is usually better to have only one to link the tables and enforce relational integrity constraints.
If this is the case then the Data form wizard can create for you a parent / child form.
There are several ways to acomplish what you want.

For the combo boxes may want to use the DataList box or the DataCombo box and select the property for the ListView only. You have to add these components in to the toolbox.
Setting the datasource and the field for the Data control will allow the updates.

David