Object doesn't support this property or method

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dryjeans
    New Member
    • Mar 2008
    • 24

    Object doesn't support this property or method

    Hello Access Experts....

    One of my staff members gets this message when she tries to log into a database I created. The DB is housed on a server that she maps to (mapped network drive). Also, I split the DB. Is that the reason for the error?? Any ideas?
  • mshmyob
    Recognized Expert Contributor
    • Jan 2008
    • 903

    #2
    This is usually an indication of something wrong in your code.

    Need more information. Does the app work for everyone else?

    Are you using the runtime or the full Access.

    Anymore info would be helpful to diagnose.

    cheers,

    Originally posted by dryjeans
    Hello Access Experts....

    One of my staff members gets this message when she tries to log into a database I created. The DB is housed on a server that she maps to (mapped network drive). Also, I split the DB. Is that the reason for the error?? Any ideas?

    Comment

    • dryjeans
      New Member
      • Mar 2008
      • 24

      #3
      Originally posted by mshmyob
      This is usually an indication of something wrong in your code.

      Need more information. Does the app work for everyone else?

      Are you using the runtime or the full Access.

      Anymore info would be helpful to diagnose.

      cheers,
      The app works FINE for everyone else. But, she is the only one who has to map a drive. The others have the application on their server.
      Are you using the runtime or the full Access?? Not sure what you mean by that. By my guess is full Access

      Comment

      • mshmyob
        Recognized Expert Contributor
        • Jan 2008
        • 903

        #4
        OK post the code that is used to 'logon' as you mentioned in your first post. Since the user is not getting past the logon then something might be wrong with that code. Also indicate at what line the error occurs on since you are using the full Access.

        I am assuming since the database is split that the BE is on the server. Just out of curiosity why does everyone have a front end (FE) on their own computer and this user does not?

        cheers,

        Originally posted by dryjeans
        The app works FINE for everyone else. But, she is the only one who has to map a drive. The others have the application on their server.
        Are you using the runtime or the full Access?? Not sure what you mean by that. By my guess is full Access

        Comment

        • dryjeans
          New Member
          • Mar 2008
          • 24

          #5
          Originally posted by mshmyob
          OK post the code that is used to 'logon' as you mentioned in your first post. Since the user is not getting past the logon then something might be wrong with that code. Also indicate at what line the error occurs on since you are using the full Access.

          I am assuming since the database is split that the BE is on the server. Just out of curiosity why does everyone have a front end (FE) on their own computer and this user does not?

          cheers,
          [code=vb]' Name: mod_display_men u
          ' Function : display the switchboard after checking the access and password and password expiry date
          ' Date: 23/09/2007


          Option Compare Database
          Option Explicit

          Public RptFlag As Integer
          Public adminflag As Integer
          Public operator As String
          Public rptnumber As Integer





          Sub display_menu()
          On Error GoTo err_display_men u

          ' at this stage the userId and access level has been checked


          Dim access_level As Integer
          Dim finish_Date As Date
          Dim port_syd As String
          Dim valid_user As Integer
          Dim check_user As Integer
          Dim password_period As Date
          Dim check_password As String
          Dim strmsg As String


          valid_user = 2

          ' *************** *************** *************** *
          ' validate user_id
          ' *************** *************** *************** *

          check_user = DCount("[user_id]", "tbl_users" , "user_id=forms! frm_main!user_i d")
          If check_user = 1 Then
          valid_user = 2
          Else
          valid_user = 0
          End If

          ' *************** *************** *************** *
          ' validate password
          ' *************** *************** *************** *

          If valid_user = 2 Then
          check_password = DLookup("[passwords]", "tbl_users" , "user_id=forms! frm_main!user_i d")
          If UCase(check_pas sword) = UCase(Forms!frm _main!password) Then
          valid_user = 2
          Else
          valid_user = 1
          End If

          End If

          ' *************** *************** *************** *
          ' validate access_level
          ' *************** *************** *************** *

          If valid_user = 2 Then
          access_level = DLookup("[access_level]", "tbl_users" , "user_id=forms! frm_main!user_i d")
          End If

          Select Case valid_user

          Case 0, 1
          strmsg = " Access Denied" & _
          vbCrLf & " Contact The Database Administrator if the problem persists. "
          MsgBox strmsg, vbCritical, " INVALID UserID or Password "

          ' DoCmd.Quit

          Case 2
          Select Case access_level
          Case 1 ' level1 menu
          ' validate password expiry

          password_period = DLookup("[password_date]", "tbl_users" , "user_id = forms!frm_main! user_id")
          If password_period < Date - 60 Then
          strmsg = " Your password expired. You must change your password"
          MsgBox strmsg, vbCritical, "Expired Password"
          DoCmd.OpenForm "frm_change_pas sword", acNormal
          Else
          adminflag = 1
          operator = UCase(Forms!frm _main!user_id)
          DoCmd.OpenForm "mainform"
          End If

          Case 2 ' level2 menu
          ' validate password expiry

          password_period = DLookup("[password_date]", "tbl_users" , "user_id = forms!frm_main! user_id")
          If password_period < Date - 60 Then
          strmsg = " Your password expired. You must change your password"
          MsgBox strmsg, vbCritical, "Expired Password"
          DoCmd.OpenForm "frm_change_pas sword", acNormal
          Else
          adminflag = 2
          operator = UCase(Forms!frm _main!user_id)
          DoCmd.OpenForm "mainform"
          End If

          Case Else
          strmsg = " ACCESS DENIED !! " & _
          vbCrLf & " Contact The Database Administrator if the problem persists. "
          MsgBox strmsg, vbCritical, "INVALID UserID or Password"
          End Select

          End Select

          exit_display_me nu:
          Exit Sub

          err_display_men u:
          MsgBox Err.decsription
          Resume exit_display_me nu

          End Sub[/code]
          Last edited by Stewart Ross; Apr 15 '08, 08:22 AM. Reason: Please use Code Tags on code segments - helps make your post more readable.

          Comment

          • mshmyob
            Recognized Expert Contributor
            • Jan 2008
            • 903

            #6
            Ok .

            First I would like to know the line number so you need to bypass your On Error Goto line.

            Does the user in question get the opportunity to enter his/her user information?
            Does the login screen popup?


            cheers,

            Originally posted by dryjeans
            [code=vb]' Name: mod_display_men u
            ' Function : display the switchboard after checking the access and password and password expiry date
            ' Date: 23/09/2007


            Option Compare Database
            Option Explicit

            Public RptFlag As Integer
            Public adminflag As Integer
            Public operator As String
            Public rptnumber As Integer





            Sub display_menu()
            On Error GoTo err_display_men u

            ' at this stage the userId and access level has been checked


            Dim access_level As Integer
            Dim finish_Date As Date
            Dim port_syd As String
            Dim valid_user As Integer
            Dim check_user As Integer
            Dim password_period As Date
            Dim check_password As String
            Dim strmsg As String


            valid_user = 2

            ' *************** *************** *************** *
            ' validate user_id
            ' *************** *************** *************** *

            check_user = DCount("[user_id]", "tbl_users" , "user_id=forms! frm_main!user_i d")
            If check_user = 1 Then
            valid_user = 2
            Else
            valid_user = 0
            End If

            ' *************** *************** *************** *
            ' validate password
            ' *************** *************** *************** *

            If valid_user = 2 Then
            check_password = DLookup("[passwords]", "tbl_users" , "user_id=forms! frm_main!user_i d")
            If UCase(check_pas sword) = UCase(Forms!frm _main!password) Then
            valid_user = 2
            Else
            valid_user = 1
            End If

            End If

            ' *************** *************** *************** *
            ' validate access_level
            ' *************** *************** *************** *

            If valid_user = 2 Then
            access_level = DLookup("[access_level]", "tbl_users" , "user_id=forms! frm_main!user_i d")
            End If

            Select Case valid_user

            Case 0, 1
            strmsg = " Access Denied" & _
            vbCrLf & " Contact The Database Administrator if the problem persists. "
            MsgBox strmsg, vbCritical, " INVALID UserID or Password "

            ' DoCmd.Quit

            Case 2
            Select Case access_level
            Case 1 ' level1 menu
            ' validate password expiry

            password_period = DLookup("[password_date]", "tbl_users" , "user_id = forms!frm_main! user_id")
            If password_period < Date - 60 Then
            strmsg = " Your password expired. You must change your password"
            MsgBox strmsg, vbCritical, "Expired Password"
            DoCmd.OpenForm "frm_change_pas sword", acNormal
            Else
            adminflag = 1
            operator = UCase(Forms!frm _main!user_id)
            DoCmd.OpenForm "mainform"
            End If

            Case 2 ' level2 menu
            ' validate password expiry

            password_period = DLookup("[password_date]", "tbl_users" , "user_id = forms!frm_main! user_id")
            If password_period < Date - 60 Then
            strmsg = " Your password expired. You must change your password"
            MsgBox strmsg, vbCritical, "Expired Password"
            DoCmd.OpenForm "frm_change_pas sword", acNormal
            Else
            adminflag = 2
            operator = UCase(Forms!frm _main!user_id)
            DoCmd.OpenForm "mainform"
            End If

            Case Else
            strmsg = " ACCESS DENIED !! " & _
            vbCrLf & " Contact The Database Administrator if the problem persists. "
            MsgBox strmsg, vbCritical, "INVALID UserID or Password"
            End Select

            End Select

            exit_display_me nu:
            Exit Sub

            err_display_men u:
            MsgBox Err.decsription
            Resume exit_display_me nu

            End Sub[/code]

            Comment

            • dryjeans
              New Member
              • Mar 2008
              • 24

              #7
              Originally posted by mshmyob
              Ok .

              First I would like to know the line number so you need to bypass your On Error Goto line.

              Does the user in question get the opportunity to enter his/her user information?
              Does the login screen popup?


              cheers,
              You say something???

              Comment

              • mshmyob
                Recognized Expert Contributor
                • Jan 2008
                • 903

                #8
                I did... hmmmm.

                I think I asked you to bypass your On Error Goto line and run the app so we can see what line it fails on.

                cheers,

                Originally posted by dryjeans
                You say something???

                Comment

                Working...