I have the following code that when the user clicks on the button the first time it does the if, then the second time it does the else. Except it is not incrementing and doing the else.
I have tried
count = count + 1
count = 1
count += 1
My code is below
'new button calls second survey page and sets mode to data
Private Sub btnTurn_Click(sender As System.Object, e As System.EventArgs) Handles btnTurn.Click
Dim count As Integer
If count = 0 Then
frmSurvey2.szCaller = "frmSurvey"
frmSurvey2.szMode = "data"
frmSurvey2.Show()
count += 1
Else
frmSurvey2.szCaller = "frmSurvey"
frmSurvey2.szMode = "print"
frmSurvey2.Show()
End If
End Sub
Aucun commentaire:
Enregistrer un commentaire