Need to upate union query statement every month

S

SSBHA

I have 47 union queries that collect data for 47 pumping stations on monthly
basis; then plots each query result. Every month a table is added to the
list of individual union query. I got tired of adding the union select
statement manully to 47 queries and started to write a little module to
handle it. Using Visual Basic scripting, I know how to create a table or a
query in a database; I know how to add records to existing table, etc. But I
don't know how to add a sql satement to an existing union query using visual
basic coding. I have tried variours DoCmd actions and Variou Methods and
none worked. Can you help?
 
J

Jeff Boyce

You might not view this as help...

If your table structure/design is such that "Every month a table is
added...", you probably have ... a spreadsheet!

You won't get very good or easy use of Access' relationally-oriented
features/functions if you insist on feeding it 'sheet data.

If you'll post back an example of what you are using for a table structure,
folks here may be able to offer alternative suggestions.

For example, if you are adding a table to represent a (new) month, a
well-normalized design would use a SINGLE table with an added field to hold
the date. That way, you don't need a new table each month, just new records
that include the month as part of the data.

Good luck!

Regards

Jeff Boyce
Microsoft Office/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

SUM in a UNION query 2
Union query 5
Duplicates in union query 3
Union Query - Group & Sum 1
Union query not displaying select statement 1
Union Query 2
Value in union query 3
Keep name of source query in Union 2

Top