From: Afrosheen via AccessMonster.com on
I have two combo boxes. Location and Super1
The location box lets you select a location where a staff member is working
at.For example U3 B-days.

The Super1 box lets you select their supervisor who works U3 B-days. As it
stands right now it will work. The problem is that it will show all
Supervisors through out the whole place.

I found a way where I can select from the Location box where it will pull up
just the supervisors for that location in the Super1 box. That works so far
so good.

Now, where the problem comes in is when the staff member is a supervisor. For
example:
Staff member Joe's location is U3 B-days
Supervisor for Joe is Fred who is also associated with U3 B-days.
Fred's supervisor would be from Unit 3. Not Unit 3 B-Days

When I go and look at staff member Joe, he has no supervisor because he's the
only one that's displayed.

This is the sql code:
SELECT qrySupervisor2.tblMain.lname+', '+tblMain.fname AS Expr1,
qrySupervisor2.PersonnelID, qrySupervisor2.[Position#], qrySupervisor2.
StaffId
FROM qrySupervisor2
WHERE (((qrySupervisor2.Location)=[forms]![frmEmployee_tab].[combo126]))
GROUP BY qrySupervisor2.tblMain.lname+', '+tblMain.fname, qrySupervisor2.
PersonnelID, qrySupervisor2.[Position#], qrySupervisor2.StaffId, tblMain.
Lname
ORDER BY tblMain.Lname;

I think I need to add something to the WHERE statement where it will show all
supervisors for Unit 1, Unit 2, Unit 3, or Unit 4

This was written right in a query not through VBA.

If it is a little confusing your not alone. I hope I've kind of worked
through it.

Thanks for the help.

--
Message posted via http://www.accessmonster.com