B
Bernhard Meier
This statement works fine if not nested or used in a union query:
select 0 as [id], "select record" as [text].
Used this way:
select 0 as [id], "select record" as [text]
union all
select tbl1.id, tbl1.text from tbl1
i get an error message saying "the query must be based on one table at
least" (Access 2000, German version).
The union query is intended to be used in a combobox rowsource. The combobox
is meant to allow record selection in a form.
My workaround so far is:
select first(0) as [id], first("select record") as [text] from tbl1
union all
select tbl1.id, tbl1.text from tbl1
The disadvantage: if relying on tbl1 in the first select part, the result
remains empty as long as tbl1 does not contain a record.
I would prefer a solution which returns the line
"0|select record"
even if tbl1 is empty.
Thanks for your suggestions, Bernhard
select 0 as [id], "select record" as [text].
Used this way:
select 0 as [id], "select record" as [text]
union all
select tbl1.id, tbl1.text from tbl1
i get an error message saying "the query must be based on one table at
least" (Access 2000, German version).
The union query is intended to be used in a combobox rowsource. The combobox
is meant to allow record selection in a form.
My workaround so far is:
select first(0) as [id], first("select record") as [text] from tbl1
union all
select tbl1.id, tbl1.text from tbl1
The disadvantage: if relying on tbl1 in the first select part, the result
remains empty as long as tbl1 does not contain a record.
I would prefer a solution which returns the line
"0|select record"
even if tbl1 is empty.
Thanks for your suggestions, Bernhard