M
mbaycura
Is there anything noticeable about this syntax that should give it reaon to
give the error can't find object?
SELECT [Ideas.*]
FROM [Res-project engineer]
UNION
SELECT [Ideas.*]
FROM [Res-mech design]
UNION
SELECT [Ideas.*]
FROM [Res-electrical design];
the queries reference [Res-project engineer], etc look like this
SELECT Ideas.*, Ideas.[Mechanical Design].Value
FROM Ideas
WHERE (((Ideas.[Mechanical Design].Value)=[Contacts].[ID]));
this query looks up in a table called "Ideas" any idea that has the contact
from the open form "Contacts" with the same ID in the mechanical design field
and works fine.
However, I can't get the union to work. Using the same exact syntax, if I
don't use the all * and in the mechanical design query just select a
particular field (like [Idea Title] which is a field in the table "Ideas"
individually then reference that in the union the union will work, but I
don't see why that would be.
I've tried different places to put the * and in different syntax combos but
could never get it to work, including using just the * by itself as suggested
by the syntax help, but nothing has worked when I have had the Ideas.* in the
sub-query.
Below here is the syntax that works when I just specify single fields in the
sub-query
SELECT [Idea Title]
FROM [Res-project engineer]
UNION
SELECT [Idea Title]
FROM [Res-mech design]
UNION SELECT [Idea Title]
FROM [Res-electrical design];
and from the sub-query
SELECT Ideas.[Idea Title], Ideas.[Mechanical Design].Value
FROM Ideas
WHERE (((Ideas.[Mechanical Design].Value)=[Contacts].[ID]));
give the error can't find object?
SELECT [Ideas.*]
FROM [Res-project engineer]
UNION
SELECT [Ideas.*]
FROM [Res-mech design]
UNION
SELECT [Ideas.*]
FROM [Res-electrical design];
the queries reference [Res-project engineer], etc look like this
SELECT Ideas.*, Ideas.[Mechanical Design].Value
FROM Ideas
WHERE (((Ideas.[Mechanical Design].Value)=[Contacts].[ID]));
this query looks up in a table called "Ideas" any idea that has the contact
from the open form "Contacts" with the same ID in the mechanical design field
and works fine.
However, I can't get the union to work. Using the same exact syntax, if I
don't use the all * and in the mechanical design query just select a
particular field (like [Idea Title] which is a field in the table "Ideas"
individually then reference that in the union the union will work, but I
don't see why that would be.
I've tried different places to put the * and in different syntax combos but
could never get it to work, including using just the * by itself as suggested
by the syntax help, but nothing has worked when I have had the Ideas.* in the
sub-query.
Below here is the syntax that works when I just specify single fields in the
sub-query
SELECT [Idea Title]
FROM [Res-project engineer]
UNION
SELECT [Idea Title]
FROM [Res-mech design]
UNION SELECT [Idea Title]
FROM [Res-electrical design];
and from the sub-query
SELECT Ideas.[Idea Title], Ideas.[Mechanical Design].Value
FROM Ideas
WHERE (((Ideas.[Mechanical Design].Value)=[Contacts].[ID]));