Create an Option Group, and let the Wizard guide you through how to put the
radio buttons in it. By definition, only one radio button can be selected in
a group.
Bind the Option Group to the field in your query, and it will automatically
get updated with the value of whatever button was selected.
The annoyance with this approach is that you have to give the buttons
numeric values, so that 1, 2, 3 or 4 will be stored in your table, not A, B,
C or D. However, you can still set the labels for the radio buttons to be A,
B, C and D, so it will appear the same to your users.
And if you want to be able to display the letters, rather than numbers,
elsewhere in your application, create a simple translation table that has
two columns: the first being the numeric value, and the second being the
corresponding alphabetic value. Create a query that joins your answers table
to this translation table.
--
Doug Steele, Microsoft Access MVP
(No private e-mails, please)
mnance said:
how do you create an option button? I'm trying to create a multiple
choice test that students can complete using MS access. i need four radio
buttons (i think) on the question form for choices A, B, C, and D. How do i
create these so it will save the corresponding answer in my database?
Additionally, students should only be able to mark one of the four--will
that be automatic?