It works fine for me if you move the button enabling/disabling code
after the radio button setting but I'm not sure why.
Code:
Sub ShowData
Label1.Text="Q"&(AnsRec+1)&". "
If Answer(AnsRec)=0 Then
For i=1 To 5
Control("RadioBtn"&i).Checked=False
Next
Else
Control("RadioBtn"&Answer(AnsRec)).Checked=True
End If
If AnsRec=0 Then
PrevBtn.Enabled=False
NextBtn.Enabled=True
Else If AnsRec=5 Then
PrevBtn.Enabled=True
NextBtn.Enabled=False
Else
PrevBtn.Enabled=True
NextBtn.Enabled=True
End If
End Sub
EDIT : Got it! I didn't originally get the full import of Erel's explanation. Disabling the Prev button causes the focus to move from the Prev button back to the Radio Button. However AnsRec has already been decremented so Radio_Click thinks this extra click it is a new value for Q1 and stores what was the value for Q2 as Q1's value overwriting the previous value. Putting the disabling later ensures that the correct Radio Button for Q1 has already been selected so that it still overwrites the answer, but with the correct one this time!