Results 1 to 6 of 6
  1. #1
    ausama.ly is offline Novice
    Windows 7 64bit Access 2013 32bit
    Join Date
    Jul 2017
    Posts
    6

    ERD Consultation

    Welcome to all


    I want to make a staff system, each employee with a login name and password, to record his or her daily sales and at the same time cannot see other users. What is the design required for such a system .
    Thanks all

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,822
    Data structure would be according to accepted relational database principles. Identify your data entities and relationships and build tables accordingly. Then form design and code would manage records that users can view. Need to split the db and each user runs their own copy of the frontend. The frontend should be set up to hide the Navigation Pane, disable shortcut menus and function keys, as well as customize the ribbon. Shift key bypass can override those settings for an accdb file so will probably want to then encrypt shift key bypass or distribute the frontend as an executable (accde) file. And if users know the location of the backend data file, all of these precautions are meaningless unless you somehow encrypt the file. If users really need to be 'in the dark' about other user data, then maybe should use MySQL or SQLServer Express as backend which have better security features. All of these elements have been topics of numerous threads. When you encounter specific issue during development, post question.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    orange's Avatar
    orange is online now Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,716
    I agree with what June has provided.

    My question is what exactly does this mean
    at the same time cannot see other users
    Are these people all working on the same tables? Is there no possible overlap of the records they may be processing/viewing?

    You may get some insight from youtube videos by Steve Bishop related to Access, Login, Forms etc.

    See this one and if that is generally what you want, then look for others by Steve.

    Good luck.
    Last edited by orange; 09-22-2017 at 07:30 PM.

  4. #4
    ausama.ly is offline Novice
    Windows 7 64bit Access 2013 32bit
    Join Date
    Jul 2017
    Posts
    6
    ( June7 ) and (orange) thanks for replay , When a user enters, he should only see his / her data
    Example attachment
    Example: (ausama) not showing data ( June7 ) and (orange) ...
    Attached Files Attached Files

  5. #5
    ausama.ly is offline Novice
    Windows 7 64bit Access 2013 32bit
    Join Date
    Jul 2017
    Posts
    6
    Well I have an idea when I log in I make a query to filter data by user name

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,822
    Your code on the right track.

    Username is not saved in SalesTable, it is ID. So have to do a DLookup to pull the ID to filter SalesForm. You will have to make sure UserName is unique in UsersTable. Set the field to Index Yes no duplicates. You could use Windows username. Review https://www.accessforums.net/showthread.php?t=23585

    DLookup returns Null if no match so have to deal with possible Null.

    Code:
    Private Sub ok_Click()
    If Not IsNull(DLookup("password", "userstable", "username= '" & Me.txt_username & "'")) Then
         DoCmd.OpenForm "SalesForm", , , "UserID=" & DLookup("ID", "userstable", "username= '" & Me.txt_username & "'") 
    Else
         MsgBox "Error ! UserName or Password is Not correct"
    End If
    End Sub
    Keep in mind Access is by default not case sensitive.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. consultation with field for multiple criteria
    By fabiobarreto10 in forum Queries
    Replies: 21
    Last Post: 03-05-2012, 01:59 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