Populate Listbox

  • Thread starter Thread starter DS
  • Start date Start date
D

DS

I have an unbound listbox that I populate with an SQL statement. The
statement is based on a table. However I would like to add "SHOW ALL" to
the listbox without adding "SHOW ALL" to the table itself. I did this once
before but I can't find my example. Any help appreciated.
Thanks
DS
 
I have this, but I'm getting an Error that the two don't match.

SELECT tblEmployees.EmployeeID, [EmpFirstName] & " " & [EmpLastName] AS
NAME, tblEmployees.EmpActive, tblEmployees.EmpSignedIN, tblJobsEmp.JobID
FROM tblEmployees INNER JOIN tblJobsEmp ON tblEmployees.EmployeeID =
tblJobsEmp.EmployeeID WHERE (((tblEmployees.EmpActive)=-1) AND
((tblEmployees.EmpSignedIN)=-1) AND ((tblJobsEmp.JobID)=21)) UNION SELECT 0
as EmployeeID, "UNASSIGNED" AS NAME FROM tblEmployees
ORDER BY NAME;

Thanks
DS
 
It looks like you have 5 collums for the 1st query...and only 3 for the
2nd....

they have to match.......

You might also try using

union all select
 
Back
Top