Change Option Group's choices and # of Choices - PLEASE HELP

G

Guest

I am creating a questionarrie database where some questions have choices like
"Strongly Agree", "Agree", "Disagree", and "Strongly Disagree" while some
questions have choices like "Yes" and "No".

I am able to use drop boxes to show different choices regarding to different
question types. However, I would like to use option group to substitue the
drop boxes. The problem of using option group is that it seems like the
NUMBER of choices in option group is fixed and the NAMES or LABELS of choices
in option group are fixed. Is there any way that I can make the label and
number of choices in option group to change according to questioin type?
Thanks in advance.
 
W

Wayne Morgan

You can change the Visible property of the items in the option group. This
will allow you to hide the ones you don't need. You can also change the
Caption property of their associated labels, but you need to use the name of
the label, not the name of the radio button (or whatever control you're
using).

Me.opt1.Visible = False 'or True
Me.lblLableForOpt1.Caption = "Test"

--
Wayne Morgan
MS Access MVP


"questionnaire response database question"
 
G

Guest

Not that hard as long as you know how many answers a question has. You just
need to create as many option buttons as the maximum number of possible
questions. Lets say you have 6 buttons identified, but this question has
only 4:
Me.opbOne.Visible = True
Me.opbTwo.Visible = True
Me.opbThree.Visible = True
Me.opbFour.Visible = True
Me.opbFive.Visible = False
Me.opbSix.Visible = False

Also, let's say you need to give different descriptions for them:
Me.lblOption1Label.Caption = "What did you say"
Me.lblOption2Label.Caption = "I don't understand"
Me.lblOption3Label.Caption = "I am confused"
Me.lblOption4Label.Caption = "This question makes no sense"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top