Results 1 to 8 of 8
  1. #1
    Join Date
    Jun 2007
    Location
    Maitland NSW,Australia
    Posts
    388

    Unanswered: Using Access 2000 database with VISTA and Access 2003

    I was asked to help solve this problem and I am seeking some guidance.

    Prior to the company upgrading from Windows XP and Access 2000 to VISTA and Access 2003, they were able to open a database, that is Access 2000 format, to display a login screen, after entering a valid User Id and Password they click on the ENTER button to display a switchboard menu.

    Now, this is the problem. Using VISTA and Access 2003 and the same Access 2000 database when they open the database the Login screen is displayed. They enter their User Id and Password then click on the ENTER button the database appears to hang and no switchboard menu is displayed.

    There is code behind the ENTER button to validate the User ID and Password, if the User ID and Password are valid then the switchboard menu should be displayed

    I do not have VISTA on my computer to test this condition. Any assistance would be appreciated.

  2. #2
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    Hey Smurf!

    It might be a good idea if you post the code behind the button.

    Also, you mention a switchboard - is this a custom form you have built or (I know it exists but have never used it) the in built switchboard?
    George
    Home | Blog

  3. #3
    Join Date
    Jun 2007
    Location
    Maitland NSW,Australia
    Posts
    388

    VISTA and Access 2003

    George

    The switchboard is a modified version of the switchboard manager that is in access. when you create a switchboard in Access the default number of menu items is 8 I have expanded that to suit our requirements.

    This is the code on the login screen form, there is no problem using this code with XP and Access 2000, I have also used it with Windows 2000 and Access 2003 with no problems.

    Private Sub cmdOK_Click()

    If UCase$(Forms!frm_splash!password) = "LINK" And UCase$(Forms!frm_splash!user_id) = "C1LINK" Then

    Msg = "Are you sure you wish to relink the data tables ?" ' Define message.
    Style = vbYesNo + vbInformation + vbDefaultButton2 ' Define buttons.
    Title = "Before continuing" ' Define title.
    Response = MsgBox(Msg, Style, Title, Help, Ctxt)
    If Response = vbNo Then
    Forms!frm_splash!password = Null
    Forms!frm_splash!user_id = Null
    Else
    Msg = "Have you created a backup of the entire folder/files ?" ' Define message.
    Style = vbYesNo + vbInformation + vbDefaultButton2 ' Define buttons.
    Title = "Before continuing" ' Define title.
    Response = MsgBox(Msg, Style, Title, Help, Ctxt)
    If Response = vbNo Then
    Forms!frm_splash!password = Null
    Forms!frm_splash!user_id = Null
    Else
    DoCmd.OpenForm "frmRelink", , , , acNormal
    End If
    End If

    Else

    If IsNull(DLookup("[region]", "tbl_region", "region_ref = 1")) Then
    MsgBox ("No region specified in the Region table")
    DoCmd.RunMacro "macro_exit"
    Else
    Me!region = DLookup("[region]", "tbl_region", "region_ref = 1")
    If Me!region = "SYD" Then
    Me!Label192.Visible = True
    Else
    Me!Label195.Visible = True
    End If
    End If

    Dim current_user As String
    Dim current_staff_level As Variant
    Dim current_password As Variant
    Dim current_access_level As Variant
    Dim update_set As String

    If IsNull(Forms!frm_splash!password) Or IsNull(Forms!frm_splash!user_id) Then
    MsgBox ("Access denied")
    DoCmd.RunMacro "macro_exit"
    End If

    ' check for a current password
    ' if no password or the password entered by the user is not the same held on file
    ' then deny access
    current_password = DLookup("[password]", "tbl_users", "User_id = UCase$(Forms!frm_splash!user_id)")

    If (IsNull(current_password)) Then
    MsgBox ("Access denied")
    DoCmd.RunMacro "macro_exit"
    End If

    If UCase$(current_password) <> UCase$(Forms!frm_splash!password) Then
    MsgBox ("Access denied")
    DoCmd.RunMacro "macro_exit"
    Else
    If Me!region = "CBR" Then
    DoCmd.OpenForm "Switchboard_CBR", , , , acNormal
    Else
    ' valid password
    current_staff_level = DLookup("[staff_level]", "tbl_staff", "User_id = UCase$(Forms!frm_splash!user_id)")
    current_access_level = DLookup("[access_level]", "tbl_users_access", "user_id = Forms!frm_splash!user_id")

    If IsNull(DLookup("[user]", "tbl_first_time", "user = UCase$(Forms!frm_splash!user_id)")) Then
    DoCmd.SetWarnings False
    DoCmd.OpenQuery "qry_append_first_time_user"
    DoCmd.SetWarnings True
    DoCmd.OpenForm "frm_instructions_ft", , , , acNormal

    Else

    Select Case current_access_level
    Case 2 ' CL2
    DoCmd.OpenForm "Switchboard_bravo", , , , acNormal

    Case 3 ' CL3
    DoCmd.OpenForm "Switchboard_sup", , , , acNormal

    Case 4, 5 ' managers, director
    DoCmd.OpenForm "Switchboard_mgr", , , , acNormal

    Case 6
    DoCmd.OpenForm "Switchboard_osg", , , , acNormal

    Case Else
    DoCmd.OpenForm "Switchboard_all", , , , acNormal
    End Select

    End If
    End If
    End If ' correct password
    End If

    End Sub

    Regards

  4. #4
    Join Date
    Jun 2005
    Location
    Richmond, Virginia USA
    Posts
    2,763
    Provided Answers: 19
    And lucky you are not to have Vista on board, Poppa Smurf! Does the handle "NVS" mean anything to you? I only ask because I just this minute got thru answering a question for this poster on TheScripts about a working db whose DLookup stopped working when...you got it, they moved to Vista!

    You need to take a look at this:

    http://www.thescripts.com/forum/thread653390.html

    Good Luck!
    Hope this helps!

    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  5. #5
    Join Date
    Jun 2007
    Location
    Maitland NSW,Australia
    Posts
    388

    Access 2000 and VISTA

    Does the handle "NVS" mean anything to you?
    No.

    I but I read a similar item on the Knowledgebase.

  6. #6
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    Hmm, I guess all I can suggest at the moment is that you resort to good old fashioned debugging! Put a stop on each of the DoCmd.OpenForm lines and see if the events are even firing!

    Sorry I can't be of more use
    George
    Home | Blog

  7. #7
    Join Date
    Jun 2007
    Location
    Maitland NSW,Australia
    Posts
    388
    Thanks George and Missinglinq

    On Monday I hope to test the database on a computer that has VISTA and Access 2003 installed. I intended to put message boxes throughout the code that I posted to show the progress after I entered the user id and password. I will also put the error trap code in to display any error messages that may occur.

    I will keep you informed.

    Regards

  8. #8
    Join Date
    Jun 2007
    Location
    Maitland NSW,Australia
    Posts
    388
    Thank all you for your assistance and advice.

    I found the problem, it was due to a LAN upgrade going from Windows 2000 and Access 2000 to VISTA and Access 2003. The database had a front end and a back end that work with the correct linking, BUT in the new configuration the name of the directory where the back end resided was changed. I assumed that the directory would not changed. Any way another problem solved.

    Allan

Posting Permissions

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