Creating a report with conflicting queries

J

jcibroski

Is it possible to create a report from 2 queries that conflict with each
other, if so how?
 
J

jcibroski

Both queries involve VIN numbers. One of the queries specifically states
that the VIN number must be present. The other query states that the VIN
number field could be empty. When trying to combine the two queries into one
report, the report errors out. The report that is being created involves
budgeting and the VIN numbers count against one of the budget account
numbers, however, not all budget accounts will have a VIN number assigned to
them. Hopefully this clarifies.
 
D

Duane Hookom

"When trying to combine the two queries into one report, the report errors
out."

How are you trying to "combine the two queries" and what do you mean by
"errors out"?

Queries can be combined with joins or unions and we don't know what you
tried. We can't read your error messages or result from our vantage point
so you need to help us.
 
J

jcibroski

The two queries are queries that have already been created and work fine to
create a report on their own. The problem is that one of the queries
contains a field stating that the value cannot be null. The other query has
the same field, but that that value can be null.
I would like some info in regards as to the best way to pull info from both
queries into one report. I don't know how to create joins or unions, so if
this info could be posted that would be helpful.
My main problem is that I don't know how to set up a report with those
queries. The report that was created tried using the same fields and I
received no info since the values for that field conflicted, ie report was
blank.
Would it be better to create a join or a union to create a report that
pulls the info to one report and out of the two, how would I do that?
Sorry for any confusion, I'm a basic Access user.
 
D

Duane Hookom

If the fields/columns in both queries are the same then I expect you should
create a union query. You would need to do this in SQL view of a query. The
SQL might look something like:

SELECT FieldA, FieldB, FieldC,...
FROM query1
UNION ALL
SELECT FieldA, FieldB, FieldC,...
FROM query2;

Use this union query as the record source of your report.
 

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

Top