Combo Box on Form - How to Query

wilderfan

Registered User.
Local time
Today, 15:09
Joined
Mar 3, 2008
Messages
172
I currently have an unbound combo box on a form which uses a query to list several employee names. The form also has a "Save" command button so that the unbound employee name can be saved in a table together with the employee's "Function".

Once the employee name has been saved with the employee's function, I'd like the combo box list to EXCLUDE that employee, as he/she has already been assigned a Function.

The query for the combo box looks to the Employee Names table. But I need the query results to exclude any employees previously saved in the Functions table.

Any thoughts on this? Do I need to get into VBA coding here or recordsets?
 
I think you can write a query with a subquery, like ..
Code:
SELECT Stuff 
FROM Table 
WHERE StuffID NOT IN 
  ( 
  SELECT StuffID 
  FROM OtherTable
  WHERE IsRelavant
  )
 
Worked perfectly, lagbolt !

All I need to do now is insert a requery line of code into the Save command button.

Many thanks.
 

Users who are viewing this thread

Back
Top Bottom