Better still use a hidden text box (I don't like variables in these kind of circumstances). Make it's default value 0 and increment accordingly:
Else
MsgBox "Password Invalid. Please Try Again", vbOKOnly, "Invalid Entry!"
me.txtLogonAttempts = me.txtLogonAttempts + 1
Me.txtPassword.SetFocus
End If