I want to add an option group control to a form and be able to assign the same value to two of the answers but access will not allow me to assign the same value to answers within the same group. Is there any way to do this.
Well, my first impulse is to ask 'Why do you need to assign the same answer to 2 different options?' Do you really need both options if the answer is the same?
On the other hand, I think I may see where you're coming from. We have a form (not Access) with something similiar in our company. We've given health questionnaires to people and one of the questions is:
Have you ever been told you have diabetes?
A) Yes (Yes stored in database)
B) No (No stored in database)
C) Only when pregnant (No stored in database)
In this case option B and C store the same answer.
If you really need the same answer twice in your option group then create an unbound option group with different answers for each option and then write some VBA code in the click event of the group to update an invisible text box bound to your table field with the appropiate value base on the option clicked.
For example, user clicks option group with 4 choices whose values are 1,2,3 and 4
Select Case me!optiongroup
Case 1
me![text] = "answer A"
Case 2
me![text] = "answer B"
Case 3
me![text] = "answer B"
Case 4
me![text] = "answer C"
end case
Hope this helps. Maq B-)
<insert witty signature here>
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.