Results 1 to 3 of 3
  1. #1
    Philm is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    May 2012
    Posts
    2

    User Passwords not recognised in Access 2010

    Hi All,

    I upgraded from Access 2002 to Access 2010 and all the user passwords are no longer recognised. It runs well in Access 2002. I ran the debugger and found that code is failing after the highlighted text in the function below, i.e. instead of performing the With qdfLogin, it goes to Errorhandler:

    Any ideas what the problem could be?


    Private Function PerformLogin(UserName As String, Password As String) As Boolean
    Dim rstLogin As Recordset
    Dim qdfLogin As QueryDef
    On Error GoTo Errorhandler
    Set qdfLogin = CurrentDb.QueryDefs("qryLogin")
    With qdfLogin
    .Parameters("Username:").Value = UserName
    .Parameters("Password:").Value = Password
    Set rstLogin = .OpenRecordset(Type:=RecordsetTypeEnum.dbOpenForwa rdOnly)


    End With
    If rstLogin.RecordCount >= 1 Then
    PerformLogin = True
    Else
    PerformLogin = False
    End If
    ReleaseAll:
    If Not rstLogin Is Nothing Then
    rstLogin.Close
    Set rstLogin = Nothing
    End If
    Exit Function
    Errorhandler:
    PerformLogin = False
    GoTo ReleaseAll
    End Function

  2. #2
    R_Badger is offline Knows a few tricks
    Windows XP Access 2003
    Join Date
    Feb 2012
    Location
    Suffolk, UK
    Posts
    262
    I notice a space between the a and r, is that present in your code or just a typo copy/pasting?
    Set rstLogin = .OpenRecordset(Type:=RecordsetTypeEnum.dbOpenForwa rdOnly)

  3. #3
    Philm is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    May 2012
    Posts
    2
    Quote Originally Posted by R_Badger View Post
    I notice a space between the a and r, is that present in your code or just a typo copy/pasting?
    Thanks for your response, the space was just in the copy and paste otherwise there is no space between the a and the r

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

Similar Threads

  1. Replies: 13
    Last Post: 11-18-2013, 02:20 PM
  2. User permissions - access 2010
    By Outlook in forum Security
    Replies: 3
    Last Post: 12-03-2012, 08:19 AM
  3. HELP>Access 2010 User Login Form Code.
    By zaaimanm in forum Programming
    Replies: 5
    Last Post: 10-22-2012, 07:28 PM
  4. Access 2010 : Current logged in user
    By raghav_pegausis in forum Access
    Replies: 7
    Last Post: 10-24-2011, 02:52 PM
  5. Setting up User names and passwords
    By knightjp in forum Security
    Replies: 2
    Last Post: 02-05-2009, 10:18 PM

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