Optiongroup

kentendresen

Registered User.
Local time
Today, 06:35
Joined
Nov 13, 2002
Messages
49
Hi!

Is it possible to change the background on the optiongroup after the user has checked one box?

I have a multiple choice form, and the user has to check off one box in the optiongroup before he goes to the next post. If he hits the right answer, I want the white 'field' in the background inside the circle to be green, and if it is wrong it becomes red.

And what do I have to do to lock the optiongroup after the user has checked off one box, on the actual post?

Regards, Kent
 
If you use buttons instead of radio controls (the round ones) you can specify a picture for the button, You could have it normal (say gray), than specify either a red or green picture depending on the answer. I think there is a LOCK property you can set to true to (Dah, Lock) the control.
 
I presume you are using a continuous form. In that case you'll need to use conditional formatting if you want to have different colors for the same control in different rows.

You have to do the locking in the current event of the form. If the control has a value (ie answer), lock it, otherwise unlock it.

If IsNull(Me.MyOptionGroup) Then
Me.MyOptionGroup.Locked = False
Else
Me.MyOptionGroup.Locked = True
End If
 
Pat!

It worked on the first post, but when I should answer the next question, the optiongroup was locked.

Have I put the code in the wrong place?
 
Disregard!

I just put in

Me.MyOptionGroup.Locked = False

on the Next Question button

Thank you
 

Users who are viewing this thread

Back
Top Bottom