Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2006

    Unanswered: Copied some tables and forms...

    Ok, so I had a database, that PKStormy helped me out with THANKS PAUL!!!!, that works, I know it works cause I tried to get them to use it at the last job but they declined. But that's another story...

    Anyways, I'm trying to reuse some of the same features on this new one. Mainly like the login of users into the database. But here's the issue...

    I have a form (frmSplashScreen) which opens when the user will double-click the shortcut icon. This form has a timer for 4 seconds, in which time it pulls the user name (see code below) which is what I want it to do.

    My issue is this: every time I try to get into the DB, it constantly says my "Account is marked InActive". However, it pulls the fOSUserName, which I manually put into the tables which need it in every possible manner but none seem to work.

    Any ideas?

    Private Sub From_Timer()
    DoCmd.Close acForm, "frmSplashScreen", acSaveNo
    If isNewUser = True Then
        MsgBox "You don't have permissions to access this database. Please contact the database administrator."
    If isAccountActive = False Then
        MsgBox "Your account has been marked In-Active, please contact the database administrator to correct this issue."
    DoCmd.OpenForm "frmUserLogon"
    End If
    End If
    End If
    End Sub

  2. #2
    Join Date
    Nov 2007
    Adelaide, South Australia
    All I can tell from that code snippet is that isAccountActive is False. Without seeing more of the code behind isAccountActive, I can't even guess why.
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!

    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  3. #3
    Join Date
    Nov 2004
    out on a limb
    Provided Answers: 59
    where are you setting isAccountActive
    I'd suggest you insert a breakpoint before the test and examine what is in isnewuser and isaccountactive

    alternatively put in a message box eg...
    msgbox("isaccountactive is:" & isaccountactive & vbcrlf & "isnewuser is:" & isnewuser)

    I'd also want to check the visibility of those variables.. if they are set in another module you will need to declare them as public
    id also want to check that you have used "option explicit" at the head of each VBA module.. that should enforce variable checking. I dunno why microsoft even allowed it in the first place, but allowing variables to be created without declaration is a sure fire way of creating subtle hard to track down bugs
    I'd rather be riding on the Tiger 800 or the Norton

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts