Results 1 to 4 of 4
  1. #1
    Join Date
    Nov 2005
    Posts
    49

    Unanswered: Need assistance with simple form.

    Everytime someone clicks a selection from "cbans" (combo box) I want "cbquestion and cbans" to loop and display
    their boxes again so the next selection can be made. Anyone know the code to do this?

    I've included an example of what I am trying to do. Any assistance would be appreciated.
    Attached Thumbnails Attached Thumbnails form.bmp  

  2. #2
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    You will probably have to manually manipulate a control array. The obvious choice would be to use a subform, but your visibility requirements shoot that in the foot. Dynamically populating and displaying control arrays is a huge bitch, good luck with that.
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  3. #3
    Join Date
    May 2004
    Location
    New York State
    Posts
    1,178
    Whoa! Back up a sec, jmweb. What do you gain by making the Question in a combo box? Make the Answer a Yes/No combo box, if you wish (I wouldn't even do that, because the user's previous answer remains selected even after going to a new question. I would have two separate check boxes [chkYes and chkNo], which can be re-initialized in the form's OnCurrent event), but make the Question in a simple text box.

    The plan would be: keep all the questions in a table (tblTestQuestions), which is the form's Record Source. Make a text box bound to the Question field. Every time the user selects a yes/no answer (in the combo box's AfterUpdate event, at which time you will be recording his answer in a table), the form will automatically go to the next record, which will display the next question.

    There is some more detail to this yellow brick road, but I think you get the gist of it.

    HTH,

    Sam
    Last edited by Sam Landy; 11-15-05 at 14:12.

  4. #4
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    more thinking:

    What about a compromise... what if you don't allow the user to go to a new record until they've answered the current question by trapping the oncurrent event? If you don't mind the visual aspects, it would accomplish the overall goal,
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

Posting Permissions

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