Results 1 to 2 of 2

Thread: Question on displaying data in a form

  1. #1

    Thread Starter
    Member
    Join Date
    Aug 1999
    Location
    Ohio
    Posts
    59

    Post

    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

  2. #2
    New Member
    Join Date
    Aug 1999
    Location
    Foxboro
    Posts
    4

    Post

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width