Results 1 to 2 of 2
  1. #1
    kloveall001 is offline Novice
    Windows 10 Office 365
    Join Date
    Aug 2021
    Posts
    1

    Updating form results based on login form (Manager/Employee many to many relationships)

    I am building an IT database that houses devices that we inventory and those devices are all assigned to employees. Employees have managers, and may have more than one manager. Each manager should be able to see only their employees. I currently have a login form that utilizes the employee table for the username combobox.

    Because an employee can have multiple managers, i created a junction table to create the many to many relationship. The login form references the employees table, but the queries/forms for the managers reference the junction table... I can pull information from the employee table into the junction query, but once i try to add criteria to the query, based on the username combobox from the login form, that is where i'm getting stuck and things seem disconnected.



    I tried basin my login combo box on the junction query, but that also did not work, kept getting errors.

    How can i tie in the user that is logged in to the query/form for the manager, so they see only their employees? I keep having a hard time due to the disconnect between my employee table and my manager table.

  2. #2
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,250
    What do you mean disconnected? Can you show an example or even better could you post a small db sample with no private\sensitive info, just a few "dummy" records to illustrate the issue?
    The login combo should be based on the employee table; in the junction query you need to add criteria to the manager side field =Forms!frmLogin!cboUser.
    Cheers,
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

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

Similar Threads

  1. Replies: 2
    Last Post: 08-31-2019, 12:08 PM
  2. Replies: 1
    Last Post: 03-26-2019, 05:20 PM
  3. Replies: 11
    Last Post: 12-12-2013, 09:51 PM
  4. Need Employee Manager
    By gentikfreak in forum General Chat
    Replies: 1
    Last Post: 01-29-2013, 09:00 AM
  5. Replies: 2
    Last Post: 08-15-2012, 09:04 AM

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