K
Karen
I'll be building a SQL statement to use as the rowsource for a combobox.
To populate the list I'll be pulling various names stored for a particular
report. For example, the report will have the names of Person1, Person2,
Person3 and Person4 so I want to populate the combo with those names. I'm
imagining something like:
cboRelatedNames.RowSource = SELECT Person1 from InfoTable _
UNION SELECT Person2 from InfoTable _
UNION SELECT Person3 from InfoTable _
UNION SELECT Person4 from InfoTable _
WHERE InfoTable.fkReportID = 4
OK, that should work but what if Person 3 is unknown at this time, I don't
want a list with two names, a blank and then another name. How do I do a
Union Select but drop the null items?
To populate the list I'll be pulling various names stored for a particular
report. For example, the report will have the names of Person1, Person2,
Person3 and Person4 so I want to populate the combo with those names. I'm
imagining something like:
cboRelatedNames.RowSource = SELECT Person1 from InfoTable _
UNION SELECT Person2 from InfoTable _
UNION SELECT Person3 from InfoTable _
UNION SELECT Person4 from InfoTable _
WHERE InfoTable.fkReportID = 4
OK, that should work but what if Person 3 is unknown at this time, I don't
want a list with two names, a blank and then another name. How do I do a
Union Select but drop the null items?