Solved Two listboxes remove selections if used (1 Viewer)

oxicottin

Learning by pecking away....
Local time
Today, 04:22
Joined
Jun 26, 2007
Messages
870
Hello, I have two listboxes (CrewOneDelimitedEmployees) and (CrewTwoDelimitedEmployees) using the same employee list to select from. I want to be able to if I select data from (CrewOneDelimitedEmployees) then it should remove the selection from (CrewTwoDelimitedEmployees) so I can't select same data.

I figured I could in each listboxes row source add under the criteria a "Not In" for the empID but how?

Something like but doesnt work:

Not In (SELECT EmpID FROM tbl_Employee WHERE EmpD= [Forms]![frm_WeeklyAttendanceSheet]![CrewOneDelimitedEmployees])
 

Attachments

Last edited:
You need some sort of flag in the employee table to indicate which list box they should appear in.
When you select one, you set that flag or clear it and requery both listboxes.
That is one way that I have done it.

You really should try searching, even here.
 
Jack,
That liink I posted also has a link you posted. :)
 
Paul,
I just saw the 2 listbox thing. I followed Datapig way back when, and then worked with Crystal and John to get the series back online. Crystal got access to the videos and arranged their storage
Lot's of good videos in the series. The links are in my signature.
 
Dang fellas im going to have to try this when I get back from the holidays! Ill post back next week....

Thanks,
 
 

Users who are viewing this thread

Back
Top Bottom