Avatar of Sandra Smith
Sandra Smith
Flag 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")));
Microsoft ApplicationsMicrosoft DevelopmentMicrosoft Access

Avatar of undefined
Last Comment
Sandra Smith

8/22/2022 - Mon
Rey Obrero (Capricorn1)

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
Vadim Rapp

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
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,
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy