Combine multiple tables with append ??

dmeid

Registered User.
Local time
Today, 21:07
Joined
Aug 7, 2002
Messages
29
I have a macro which runs many different queries to group and sum data. After this process is done, it should produce 12 different tables with only 1 record in each table. But there are times where there is no data to add records to a particular table.

Each of these 12 tables need to be combined into 1 table for me to list the results on a report. I have created an append query to do this.

I am having a problem when one/or many of the 12 tables that do not have any data in them to load into the new combine table. I get no errors, nor do I get any data fields(of the tables that do have data in it) added to the new combine table.

I know it has to do with any of the 12 tables that do not have any data in it.

How do I get around ignoring those tables or testing them to be blank, in order for the tables with data fields to be appended in my Append Query?

I appreciate any help on this matter!!! D
 
It sounds more like a design issue, but that aside what I would do is have a macro that runs your 12 append queries. As a condition on each append query (in the macro) use a DCOUNT on the table and check if it is zero/not zero than conditionally execute that append query.

Or create a big UNION query to pull the data and use that as a basis for your report.
 

Users who are viewing this thread

Back
Top Bottom