Views:
Size: ">Attachment 45902I HAV A SELECT CASE AND END CASE BUT VBA SAYS I DON'T HAVE A SELECT CASE?????(END CASE WITHOUT SELECT CASE) HUH? WHAT AM I MISSING?
Code:
Code:
Select Case auth
'================
Case True
'------------
Debug.Print auth & "<<auth"
Set rs = Nothing
Exit Sub
Debug.Print s3 & " " & s4
' End If
Set rs = Nothing
Exit Sub 'onload() don 't need to check sn/pw
'-------------------------
Case False 'auth is false not authorized
'-------------------------
s3 = rs.Fields![serialnum]
s4 = rs.Fields![password]
If Not IsNull(s3) Then 'serial exists
If s4 <> "DEMO" And Not IsNull(s4) And Not IsNull(s3) Then 'valid serial, invalid pw
s4 = gettauthcode(s3) 'get new auth code
End If
Exit Sub
'= = = = = = = = = = =
If (IsNull(s3) Or IsNull(s4)) Then ' serial is null or password is null
GettSerial 'which also calls gettauthcode(s3)
Debug.Print s3; s4
rs.Fields![seralnum] = s3
Debug.Print s3 & "<<<<s3"
Call gettauthcode(s3)
Debug.Print s4 & "<<<S4"
Me.[chkauth] = False
rs.Fields![Authorized] = False
Else 'not null(s3)
If Len(s3) <> 6 And (Val(s3) < 111111 Or Val(s3) > 999999) Then ' not isnull(s3)
Call GettSerial 'get new serial &auth code
End If
End If
End Select