Results 1 to 6 of 6
  1. #1
    funkygoorilla is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Aug 2011
    Posts
    93

    Tying records to users


    Hi, forgive me if I am not specific enough. But, is there a way to prohibit users from being able to access\delete\modify any records but the ones that are their own? I have created a database that has a logon screen, that basically validates the username with the password that the user enters. The username and password are kept in a table. I would then like to somehow setup a way for the user to only be able to enter records as them? I don't know if that is possible though. Or any other work arounds?
    Thanks, FunkyG

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,816
    You would need value in table to use as filter criteria. RecordSource for forms would have to be a query that filters the records presented based on the criteria.

    Do you want to filter records by individual or the department they work in?
    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
    funkygoorilla is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Aug 2011
    Posts
    93
    Hi, I would like to filter them by individual. My concern is that other people may be able to enter records as other people. Right now I have the logon setup, but I dont know of a way to confirm at least this level of security.

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,816
    I do something similar by getting the username from the network with Environ("USERNAME") - yes, type it exactly as shown. Access will not recognize the Environ function but VBA will. I don't bother with password because I take it for granted if they are validated by network they are valid users for the database. I have a Users table that has username and initials (so far everyone's initials are unique, you might use an autonumber field). I set a textbox on main menu form to user's initials so always available for reference becaues the main menu form never closes. When user starts a new record their initials are automatically saved to table. This occurs in only one table that is parent to most other tables. So all related records could be filtered by join to the parent table. I don't actually do filtering, we record initials just to document who did what at various stages of a process. My setup doesn't require users to 'login'. I identify the user by their network username.
    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.

  5. #5
    funkygoorilla is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Aug 2011
    Posts
    93
    Hi,
    So can I tie a field on a form to a record in a table, that will capture the users username with the ENVIROn control, and everytime that user inputs information it will capture the username with it?
    If so, can you give me an example of how to use it?

  6. #6
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,816
    My suggestion is that you use the ENVIRON function to get the user's name when they open the project. You can either set an unbound textbox to the username or unique record ID from the Users table. Then refer to the textbox as filter criteria when you open forms or reports. These forms/reports would need to have a field in the RecordSource with user name or the unique ID from the Users table. How you save the username/unique ID to records is another issue. As I said, Access does not recognize ENVIRON but VBA does. Will require VBA to populate the username/ID in the data table. This can take place when the form closes and record is saved.
    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. multiple users
    By slimjen in forum Security
    Replies: 8
    Last Post: 02-09-2012, 10:50 PM
  2. Multi Users
    By brobb56 in forum Access
    Replies: 1
    Last Post: 09-20-2011, 04:07 PM
  3. Prevent Users from Deleting Records
    By DocOrganizer in forum Access
    Replies: 15
    Last Post: 11-30-2010, 02:57 PM
  4. Access users
    By Captain in forum Access
    Replies: 3
    Last Post: 04-16-2010, 06:10 AM
  5. multiple users
    By ramkitty in forum Access
    Replies: 1
    Last Post: 03-22-2010, 07:15 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