Union Query - Invalid use of null

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?
 
M

Michel Walsh

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top