Results 1 to 7 of 7
  1. #1
    4 Star Lounger
    Join Date
    May 2001
    Location
    Oxfordshire
    Posts
    456
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Buttons on form (2000)

    I've been given the task of replacing an old Paradox questionaire with an Access version, & for the most part I can muddle through. But there is one particular item which I'd like to replicate, but don't know how. The questions are multiple choice, but may be anything from true or false to a choice of 5 answers, & there are only the appropriate number of buttons shown, i.e. true/false question has 2 buttons on show, & a question with answers A B C D E has 5 buttons displayed. I just have no idea how to implement this in Access.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Buttons on form (2000)

    You would use an option group with radio buttons for this. To get a more specific answer, you'll need to tell us how the questions are stored in a table (what are the field names and field types used for this).

  3. #3
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: Buttons on form (2000)

    How many questions are there?
    Could this be handled by a series of Combo boxes?
    Pat <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16>

  4. #4
    4 Star Lounger
    Join Date
    May 2001
    Location
    Oxfordshire
    Posts
    456
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Buttons on form (2000)

    It's quite a selection of questions, by selecting the the appropriate skill to be tested on. However, there will be a few that will have accompanying (?) photo, or vid clip. The test shows just one question at a time. With the current DB, when the person finishes one question, say with 3 possible answers & 3 buttons, the next question comes up & may have 4 possible answers & corresponding buttons.

    I don't believe Combo boxes would work too well, one test has to be sat by EVERY person joining our company, including those who've never even touched a PC in their life.

    The radio button approach may be the way, I'm not sure about any of this yet, we'll see how it goes. As for how the questions & answers are tabled, I'm not yet decided which way would work best, but I'm seriously considering a table of questions related to the appropriate answer table, as I do need to find a way of designating the correct answer for an automated post test report print out.

    All suggestions welcome!

  5. #5
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts

    Re: Buttons on form (2000)

    If you only want one question on display at a time, then you can use command buttons .

    You could have a separate form for each question, have a hidden control that will hold the user's response.

    Each command button could have code like this:

    me!txtquestion1 = 1
    docmd.close acform, me.name
    docmd.open acform, "frmquestion2"

    So each button would store a solution, close the current form then open the next.

    If there aren't too many questions you could have one long form, with page breaks between each question. In this case the buttons would go to the next page rather than closing and opening forms. You can't make the detail section of a report longer than 56 cms ( about 20 inches?) so you could easily need separate forms.
    Regards
    John



  6. #6
    4 Star Lounger
    Join Date
    May 2001
    Location
    Oxfordshire
    Posts
    456
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Buttons on form (2000)

    I like the sound of that John, but I just had an idea; would a tabbed form (1 tab per question) be a viable way to go? That way I'd only need to do the one form per questionnaire & would have the appropriate number of command buttons on each tab.
    N.B. there are likely to be 20, 30 or more questionnaires over time. Or, would making just a series of forms each with different number of buttons displayed & have the relevant form used for each question.

    If this is sounding to you like I'm outta my depth, you'd be right! Especially as I'm a complete duffer with code. But I AM learning [img]/forums/images/smilies/smile.gif[/img]

  7. #7
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts

    Re: Buttons on form (2000)

    A tabbed form is a good idea. It solves a few problems.

    You need to allow users to check their answers and change their minds. My previous post was too cut throat.

    With a tabbed form you can show /hide pages, so that only one is visible at a time.

    I attach a sample that might help you with some of the code. It has just 6 questions, and I have only written two of them.
    Attached Files Attached Files
    Regards
    John



Posting Permissions

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