Access Muti-users

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mseo
    New Member
    • Oct 2009
    • 183

    Access Muti-users

    hi
    I have a database and I want to deploy to multi-user environementm whereas when any user open the database using his username and password opens specific form and I want to make the form allowe to be opened by the user with specific password and username and not be opened using any other password or username
    I have no Idea about how to make this happen using access 2003
    thanks for any help you may provide me
  • Echidna
    New Member
    • Jan 2008
    • 53

    #2
    Hi,

    Store the Username in a table, and the form name within a separate column within the table.

    Code:
    docmd.openform & dlookup("columnname","tblusernames","[username]= '" & controlname & "'"), View, FilterName, WhereCondition, DataMode, WindowMode, OpenArgs
    That is one way it could be done.

    if the username within the database is the network login set the username = ENVIRON("USERNA ME")

    Hope this helps

    Cheers

    Leon

    Comment

    • TheSmileyCoder
      Recognized Expert Moderator Top Contributor
      • Dec 2009
      • 2322

      #3
      To make a very simple password protection of a form:
      Code:
      Private Sub Form_Open(Cancel As Integer)
          Dim strPassword As String
      
              strPassword = InputBox("Please write your password")
          
          'Compare to stored password
              If strPassword = "Ha53286a" Then
                  Cancel = False
                  Else
                  Cancel = True
                  MsgBox "Incorrect password supplied"
              End If
      End Sub
      Setting cancel =true will cancel the form opening.


      To make something more advanced, I would suggest a table with the UserID, UserInitals, UserName, Password + whatever. Then make a subtable of the form names that user is allowed to open.

      Comment

      Working...