First though I'll goto into the overview of the problem. I need to create an append query to move the values of one table to another for monthly backups. This is not hard as I have already created an Append Query. The problem is that the table name changes monthly (destination name that is) and worse the tables are named using Natural Language so they are similar to "Entry Control List Feb 2007" etc. This of course seems to be throwing SQL off terribly if I generate it using VBA prior to execution.
What I really need is help with a SQL string that can be generated in VBA and executed. Unfortunately I have no control over the naming convention and can not alter it at this time. Below I have included the working SQL from the append query, however of course it does not work when generated in VBA.
Expand|Select|Wrap|Line Numbers
- INSERT INTO [Blank Entry Control Log]
- SELECT [Entry Control Log].*
- FROM [Entry Control Log]
- WHERE (((Month([Date:]))=Month([Entry Control Log]![Date])) AND ((Year([Date:]))=Year([Entry Control Log]![Date])));
Thanks in advance.
- Minion -
-- Here's to baptisim by fire --