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
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.
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.