Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2004

    Unanswered: Parent/Child Relationship

    I have a Form with a subform used to view employee information. The subform is the table with all the info. On the form had three drop downs : Vice President, Manager, & Supervisor. I have a parent/child relationship set up between the form and subform. The problem is that you have to choose from all three before it shows any data. I would like to be able to choose a VP and see all his employees, or just choose a manager, or just a supervisor. Anyone have any thoughts?? Thanks in advance

  2. #2
    Join Date
    Aug 2003
    Cleveland USA


    How about for each dropdown's OnUpdate event, you point to a Sub with a name like "subUpdateEmployeeList"? The subroutine would requery the Employee table based on something like

    Select * from Employees where ([VicePresident] Like "*" & [Vice Present combo box name] & "*") and ([Manager] Like "*" & [Manager combo box name] & "*") And ([Supervisor] Like "*" & [Supervisor combo box name] & "*")

    I think you might not be using Like, but Equals, which means if you don't fill in the box, you want the employees with a blank for that field. Do you already have the org chart in the db, so that if you pick a supervisor, you already know who the manager and vp are? If so, then if the Manager doesn't match the VP, you won't get any results.

  3. #3
    Join Date
    Aug 2004
    Steamboat Springs, CO
    It seems to me that the first step is to develop a query or SQL statement that will look into those three boxes and return the appropriate list of employees. The only complicated part of this would involve create an SQL statement that took into account a combox that was empty. I'm think that this would have to be done with VBA code.

    Jeremy Brooks
    PSIA-Rocky Mountain

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts