Union Query - Invalid use of null

  • Thread starter Thread starter sunflare98
  • Start date Start date
S

sunflare98

A union query I developed has suddenly stopped working. The syntax
is:

SELECT * FROM [myQuery - Part 1] UNION SELECT * FROM [myQuery - Part
2];

Pulling up each query individually works fine. When i run the above
union query I receive "Invalid use of Null". The number and order of
the columns in each query are identical. Access 2003 here.

Any ideas what could be the problem?
 
I suspect it is the VBA code that you are using around the query, not the
query, that stopped working. To confirm, does your query is executable from
the query editor?

If it does not, you also confirm that

SELECT * FROM [myQuery - Part 1]

works, and also

SELECT * FROM [myQuery - Part 2]


and also, that they have the same number of columns (is it not possible that
one involved query did get modified, recently, such as having one extra
column)? and also confirm that each matching column (by position) has the
same data type, or a compatible datatype (and not, say, column 1 first query
is a number, and column 1, second query, is a text) ?


Vanderghast, Access MVP
 
Back
Top