Results 1 to 3 of 3
  1. #1
    Synergy.ron@gmail.com is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Oct 2020
    Location
    washington
    Posts
    126

    if will not branch

    [code]Select Case auth ' auth is true/false '================
    Case True
    '--------------------
    Debug.Print auth
    If Not IsNull(s3) Then 's3 exists
    Set rs = Nothing
    Exit Sub
    Else 's3 is null so get sial &pw
    s3 = rs.Fields![serialnum]
    Debug.Print s3
    s4 = rs.Fields![password]
    End If
    Set rs = Nothing
    Exit Sub 'onload() don 't need to check sn/pw
    '-------------------------
    Case False 'auth is false not authorized
    '= = = = = = = = = = =
    If (s3 = Null Or s4 = Null) Then ' serial is null or password is null


    GettSerial 'which also calls gettauthcode(s3)
    Debug.Print s3
    Debug.Print s4
    rs.Fields![seralnum] = s3
    Call gettauthcode(s3)
    Me.[chkauth] = False
    rs.Fields![Authorized] = False
    End If
    End Select
    ================
    as i debug, when i get to the if(s3 = null or.....does not execute or err but instead branches to the endif. what's up with that?

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,521
    you cant ask : if s3=null
    it must be: if IsNull(s3)

  3. #3
    Synergy.ron@gmail.com is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Oct 2020
    Location
    washington
    Posts
    126
    thanks ranman. Nice to have your eyes on the code!

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 7
    Last Post: 11-13-2020, 11:25 AM
  2. Replies: 2
    Last Post: 12-15-2019, 06:36 PM
  3. multiple branch primary key conflict
    By soul786 in forum Import/Export Data
    Replies: 8
    Last Post: 11-27-2015, 03:31 PM
  4. Replies: 3
    Last Post: 05-22-2013, 01:56 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums