Click to See Complete Forum and Search --> : why are all buy one of my incorrects correct?


kazooie21
November 11th, 1999, 03:37 PM
I don't understand! Why do all but one of my incorrect answers come out correct? My correct answers come out just fine. Here is my code.


option Explicit
Dim strCapital as string, strChoice as string

private Sub cmdCheck_Click()
If optCal.Value = optSac.Value then
lblMsg.Caption = "Correct"
else
lblMsg.Caption = "Incorrect"
End If
If optCol.Value = optDen.Value then
lblMsg.Caption = "Correct"
else
lblMsg.Caption = "Incorrect"
End If
If optIll.Value = optSpr.Value then
lblMsg.Caption = "Correct"
else
lblMsg.Caption = "Incorrect"
End If
If optOre.Value = optSal.Value then
lblMsg.Caption = "Correct"
else
lblMsg.Caption = "Incorrect"
End If
If optWis.Value = optMad.Value then
lblMsg.Caption = "Correct"
else
lblMsg.Caption = "Incorrect"
End If
If optSac.Value = optCal.Value then
lblMsg.Caption = "Correct"
else
lblMsg.Caption = "Incorrect"
End If
If optDen.Value = optCol.Value then
lblMsg.Caption = "Correct"
else
lblMsg.Caption = "Incorrect"
End If
If optIll.Value = optSpr.Value then
lblMsg.Caption = "Correct"
else
lblMsg.Caption = "Incorrect"
End If
If optOre.Value = optSal.Value then
lblMsg.Caption = "Correct"
else
lblMsg.Caption = "Incorrect"
End If
If optWis.Value = optMad.Value then
lblMsg.Caption = "Correct"
else
lblMsg.Caption = "Incorrect"
End If
End Sub
private Sub cmdExit_Click()
End
End Sub

private Sub cmdPrint_Click()
'hide command buttons before printing the form
cmdCheck.Visible = false
cmdPrint.Visible = false
cmdExit.Visible = false
PrintForm
'display command buttons after the form is printed
cmdCheck.Visible = true
cmdPrint.Visible = true
cmdExit.Visible = true
End Sub

private Sub Form_Load()
'center the form
frmStates.Top = (Screen.Height - frmStates.Height) / 2
frmStates.Left = (Screen.Width - frmStates.Width) / 2
End Sub

private Sub optCal_Click()
'assign correct capital to strCapital variable
strCapital = optSac
'clear label control
lblMsg.Caption = " "
End Sub

private Sub optCol_Click()
'assign correct capital to strCapital variable
strCapital = optDen
'clear label control
lblMsg.Caption = " "
End Sub

private Sub optDen_Click()
'assign capital choice to strChoice variable
strChoice = optCol.Value
'clear label control
lblMsg.Caption = " "
End Sub

private Sub optIll_Click()
'assign correct capital to strCapital variable
strCapital = optSpr
'clear label control
lblMsg.Caption = " "
End Sub

private Sub optMad_Click()
'assign capital choice to strChoice variable
strChoice = optWis.Value
'clear label control
lblMsg.Caption = " "
End Sub

private Sub optOre_Click()
'assign correct capital to strCapital variable
strCapital = optSal
'clear label control
lblMsg.Caption = " "
End Sub

private Sub optSac_Click()
'assign capital choice to strChoice variable
strChoice = optCal
'clear label control
lblMsg.Caption = " "
End Sub

private Sub optSal_Click()
'assign capital choice to strChoice variable
strChoice = optOre
'clear label control
lblMsg.Caption = " "
End Sub

private Sub optSpr_Click()
'assign capital choice to strChoice variable
strChoice = optIll
'clear label control
lblMsg.Caption = " "
End Sub

private Sub optWis_Click()
'assign correct capital to strCapital variable
strCapital = optMad
'clear label control
lblMsg.Caption = " "
End Sub





kazooie21