G
gator
I have a Union Query named "Union Query". I want to add a combo box to a
form and set it's row source as....
SELECT DISTINCT field11 FROM Union Query
The Union Query is combining about 7 tables and takes a few seconds to
compile, when I just run the query by itself, but I've tested it and it
works.
BUt, I am getting errors when I try to click the combo box. Here is the
error...
Syntax error in FROM clause
So I changed the row source to
SELECT DISTINCT field11 FROM Union_Query
I then get error....
The record source 'SELECT DISTINCT field11 FROM UNION_QUERY;' specified on
this form or report does not exist.
THe Union Query is named "Union Query" and here is the SQL for it....
select [field3],[field6],[field7],[field8],[field11],[field12]
from [2007Q1]
UNION select [field3],[field6],[field7],[field8],[field11],[field12]
from [2007Q2]
UNION select [field3],[field6],[field7],[field8],[field11],[field12]
from [2007Q3]
UNION select [field3],[field6],[field7],[field8],[field11],[field12]
from [2007Q4]
UNION select [field3],[field6],[field7],[field8],[field11],[field12]
from [2008Q1]
UNION select [field3], [field6],[field7],[field8],[field11],[field12]
from [2008Q2]
UNION select [field3], [field6],[field7],[field8],[field11],[field12]
from [2008Q3]
UNION select [field3], [field6],[field7],[field8],[field11],[field12]
from [2008Q4]
UNION select [field3],[field6],[field7],[field8],[field11],[field12]
from [2009Q1]
UNION select [field3],[field6],[field7],[field8],[field11],[field12]
from [2009Q2];
What am I doing wrong?
form and set it's row source as....
SELECT DISTINCT field11 FROM Union Query
The Union Query is combining about 7 tables and takes a few seconds to
compile, when I just run the query by itself, but I've tested it and it
works.
BUt, I am getting errors when I try to click the combo box. Here is the
error...
Syntax error in FROM clause
So I changed the row source to
SELECT DISTINCT field11 FROM Union_Query
I then get error....
The record source 'SELECT DISTINCT field11 FROM UNION_QUERY;' specified on
this form or report does not exist.
THe Union Query is named "Union Query" and here is the SQL for it....
select [field3],[field6],[field7],[field8],[field11],[field12]
from [2007Q1]
UNION select [field3],[field6],[field7],[field8],[field11],[field12]
from [2007Q2]
UNION select [field3],[field6],[field7],[field8],[field11],[field12]
from [2007Q3]
UNION select [field3],[field6],[field7],[field8],[field11],[field12]
from [2007Q4]
UNION select [field3],[field6],[field7],[field8],[field11],[field12]
from [2008Q1]
UNION select [field3], [field6],[field7],[field8],[field11],[field12]
from [2008Q2]
UNION select [field3], [field6],[field7],[field8],[field11],[field12]
from [2008Q3]
UNION select [field3], [field6],[field7],[field8],[field11],[field12]
from [2008Q4]
UNION select [field3],[field6],[field7],[field8],[field11],[field12]
from [2009Q1]
UNION select [field3],[field6],[field7],[field8],[field11],[field12]
from [2009Q2];
What am I doing wrong?