Link to home
Start Free TrialLog in
Avatar of Sandra Smith
Sandra SmithFlag for United States of America

asked on

Add "ALL" to list, not showing up in ACCESS 200 Table/Query statement

I have the below and even if no data is in the table, I want the combobox to at leas show the term "[All]J".  However, while it works in two other comboboxes, I cannot get this one to display the [All] term even if there is no data from the other union statement.

SELECT "[All]" As ProjectFullID, "[All]" As ProjectName, "[All]" As ProjectID From tblProjects
UNION
SELECT tblProjectFTE.ProjectFullId, tblProjectFTE.ProjectName, tblProjectFTE.ProjectID
FROM tblProjects INNER JOIN tblProjectFTE ON tblProjects.ProjectID = tblProjectFTE.ProjectID
WHERE (((tblProjects.Status) Not In ("Closed","Excluded")));
Avatar of Rey Obrero (Capricorn1)
Rey Obrero (Capricorn1)
Flag of United States of America image

if ProjectFullId and ProjectID is numeric

SELECT 0 As ProjectFullID, "<All>" As ProjectName, 0 As ProjectID From tblProjects
UNION
SELECT tblProjectFTE.ProjectFullId, tblProjectFTE.ProjectName, tblProjectFTE.ProjectID
FROM tblProjects INNER JOIN tblProjectFTE ON tblProjects.ProjectID = tblProjectFTE.ProjectID
WHERE (((tblProjects.Status) Not In ("Closed","Excluded")));
ASKER CERTIFIED SOLUTION
Avatar of Vadim Rapp
Vadim Rapp
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Sandra Smith

ASKER

That was it, there were no rows in the table!  I did not even think of that.  I put a seed row in and it works now.  Thank you,