ppedersen1
Technical User
Hello, I created a simple form in MSAccess and for some reason I am getting a "Type Mismatch" error. The highlighted error is the "+" below where it says "Wins = Wins + 1." This doesn't seem right. Can someone help me out here?
Here is my VBA code:
Private Sub cmdSpin_Click()
Image15.Visible = False 'hide coins
Label1.Caption = Int(Rnd * 10) 'pick numbers
Label2.Caption = Int(Rnd * 10)
Label3.Caption = Int(Rnd * 10)
Spins = Spins + 1
'if any caption is 7 display coin stack and beep
If (Label1.Caption = 7) Or (Label2.Caption = 7) _
Or (Label3.Caption = 7) hen
Image15.Visible = True
Beep
Wins = Wins + 1
Label16.Caption = "Wins: " & Wins
End If
lblRate.Caption = Rate(Wins, Spins)
End Sub
I also created two modules. The Wins module simply says
"Public Wins"
Here is my VBA code:
Private Sub cmdSpin_Click()
Image15.Visible = False 'hide coins
Label1.Caption = Int(Rnd * 10) 'pick numbers
Label2.Caption = Int(Rnd * 10)
Label3.Caption = Int(Rnd * 10)
Spins = Spins + 1
'if any caption is 7 display coin stack and beep
If (Label1.Caption = 7) Or (Label2.Caption = 7) _
Or (Label3.Caption = 7) hen
Image15.Visible = True
Beep
Wins = Wins + 1
Label16.Caption = "Wins: " & Wins
End If
lblRate.Caption = Rate(Wins, Spins)
End Sub
I also created two modules. The Wins module simply says
"Public Wins"