Monday, March 12, 2007

Duplicate bug fixed by Paul Lee

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Static lIndex As Long Dim aFields
If m_sSelectedCorrectDefinition <> m_sCorrectDefinition Then MsgBox("not") Exit Sub End If If lIndex > UBound(m_aAllRecordsArray) Then lIndex = 0
End If

aFields = Split(GetRecord(lIndex), "") lIndex = lIndex + 1
Place: If UBound(aFields) > 0 Then lblDef1.Text = aFields(0) m_sCorrectDefinition = aFields(1)
RadioButton1.Text = GetNewRandomDefinition() RadioButton2.Text = GetNewRandomDefinition() RadioButton3.Text = GetNewRandomDefinition() RadioButton4.Text = GetNewRandomDefinition() RadioButton5.Text = GetNewRandomDefinition()
WriteCorrectDefToRandomRadioButton()
RadioButton1.Checked = False RadioButton2.Checked = False RadioButton3.Checked = False RadioButton4.Checked = False RadioButton5.Checked = False
End If
If RadioButton1.Text = RadioButton2.Text Or RadioButton1.Text = RadioButton3.Text Or RadioButton1.Text = RadioButton4.Text Or RadioButton1.Text = RadioButton5.Text Or RadioButton2.Text = RadioButton3.Text or RadioButton2.Text = RadioButton4.Text or RadioButton2.Text = RadioButton5.Text or RadioButton3.Text = RadioButton4.Text or RadioButton3.Text = RadioButton5.Text or RadioButton4.Text = RadioButton5.Text Then
GoTo Place

End If
End Sub

No comments: