Results 1 to 3 of 3
  1. #1
    MichelleVL is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Nov 2016
    Posts
    4

    Assign User to certain part of database

    Hi I have database:



    So I have tblBusiness with one-to-may relation to department. Once business can have many department. But now... I have lot users. I want assign some user to Business A and some other users to BusinessB.

    When John login he must only see Business A
    When Mary login she must only see Business B

    Business A
    - Department A
    - Sales Jan
    - Sales Feb
    - Department B
    - Sales June

    Business B
    - Department 1
    - Sales May
    - Sales Aug
    - Department 2
    - Sales April
    - Sales Feb

    Can some one please say how to do?

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,549
    I have a tUser table...userID, dept
    BSmith,A
    SueH,B

    When the form opens,it gets their userID,I lookup the dept. I fill invisible text boxes on the form.

    TxtUser =Environ("username")
    txtDept=Dlookup("[dept]","tUser","[userID]='" & txtUser & "'")

    then all queries look at the dept text box.
    select * from table where [dept]=forms!frmMain!txtDept

  3. #3
    MichelleVL is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Nov 2016
    Posts
    4
    hi, is this for to see reports? I mean different users to enter data only for his/her assigned Business....

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

Similar Threads

  1. Set a user input as part of expression
    By ddeaton66 in forum Access
    Replies: 5
    Last Post: 09-16-2016, 11:18 AM
  2. Replies: 3
    Last Post: 08-04-2014, 09:52 PM
  3. Replies: 1
    Last Post: 10-25-2013, 03:38 PM
  4. Replies: 2
    Last Post: 08-15-2012, 11:42 AM
  5. Replies: 0
    Last Post: 01-18-2007, 07:07 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