List Box Problem

mshelley1

Carbo
Local time
Today, 01:56
Joined
Feb 12, 2006
Messages
45
Windows XP Pro

Situation:
I have a form named “COMMUNICATIONS” connected to a flat-file table named “communications” There is a textbox named “unit” which contains an employees Id number and another textbox named “ActivityCode”.

Additionally, a listbox named” list0” which is connected to a query to show all employees that are available for call; this is identified by (ActivityCode.value =”10-41”)

The second listbox named”list1628” that is also connected to a query which shows units that are assigned to a call and are no longer available for calls.

Problem:
When the employee is assigned to a call he/she still show up in “list0” as an available unit. In short if a unit is in list1628 then it doesn’t need to be in list0 and vice versa. I have included the sql code for each listbox

List0 code:
SELECT Communications.Item, Communications.Unit, Communications.Received, Communications.AGENCY, Communications.[Duty Officers], Communications.[DAY WORD]
FROM Communications
WHERE (((Communications.Received) Is Not Null) AND ((Communications.Completed) Is Null) AND ((Communications.[Activity Code])="10-41"));

List1628:
SELECT OnSceneQuery.Item, OnSceneQuery.Unit, OnSceneQuery.Location, OnSceneQuery.Arrived, OnSceneQuery.[Activity Code], OnSceneQuery.[DAY WORD], OnSceneQuery.Operator
FROM OnSceneQuery
ORDER BY OnSceneQuery.Item;

Any help will be appreciated.
 
Hello:
Enclosed is an example database with an example.
'
Select an employee from the first box and notice that it disappears from the second box.
Regards
Mark
 

Attachments

Users who are viewing this thread

Back
Top Bottom