access rights problems

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • charvi
    New Member
    • May 2007
    • 121

    access rights problems

    I have adeveloped a time sheet project where each employee time sheet is maintained.Now since i want to use in network when i login to the system with a name for eg Smitha.i want have accessonly to all records by smitha.my project is in vb and ms access please help me
  • jamesd0142
    Contributor
    • Sep 2007
    • 471

    #2
    Originally posted by charvi
    I have adeveloped a time sheet project where each employee time sheet is maintained.Now since i want to use in network when i login to the system with a name for eg Smitha.i want have accessonly to all records by smitha.my project is in vb and ms access please help me


    suppose you could detect the user profile name, and create a sql statement according to that...

    Comment

    • debasisdas
      Recognized Expert Expert
      • Dec 2006
      • 8119

      #3
      You are storing user names in database tables ?

      Comment

      • charvi
        New Member
        • May 2007
        • 121

        #4
        Originally posted by debasisdas
        You are storing user names in database tables ?
        how do i get user names when i login to computer please can u explain in detail

        Comment

        • debasisdas
          Recognized Expert Expert
          • Dec 2006
          • 8119

          #5
          From where you get the employee name ?

          Is it stored in database table ?

          Comment

          • charvi
            New Member
            • May 2007
            • 121

            #6
            Originally posted by debasisdas
            From where you get the employee name ?

            Is it stored in database table ?
            It is maintained in the server.i dont know exactly where the name is stord this name is the login name when we login to the system

            Comment

            • jamesd0142
              Contributor
              • Sep 2007
              • 471

              #7
              In vb.net you can retrieve the username like this:

              [code=vbnet]
              Declare Function GetUserName Lib "advapi32.d ll" Alias _
              "GetUserNam eA" (ByVal lpBuffer As String, _
              ByRef nSize As Integer) As Integer

              Public Function GetUserName() As String
              Dim iReturn As Integer
              Dim userName As String
              userName = New String(CChar(" "), 50)
              iReturn = GetUserName(use rName, 50)
              GetUserName = userName.Substr ing(0, userName.IndexO f(Chr(0)))
              End Function
              [/code]

              Comment

              • charvi
                New Member
                • May 2007
                • 121

                #8
                Originally posted by jamesd0142
                In vb.net you can retrieve the username like this:

                [code=vbnet]
                Declare Function GetUserName Lib "advapi32.d ll" Alias _
                "GetUserNam eA" (ByVal lpBuffer As String, _
                ByRef nSize As Integer) As Integer

                Public Function GetUserName() As String
                Dim iReturn As Integer
                Dim userName As String
                userName = New String(CChar(" "), 50)
                iReturn = GetUserName(use rName, 50)
                GetUserName = userName.Substr ing(0, userName.IndexO f(Chr(0)))
                End Function
                [/code]
                how can i retreive user name in vb6

                Comment

                Working...