in reply to Automating the creation process of MS Access Tables

You want to look at DBI and DBD::ODBC. This will give you a way of sending SQL commands to an ODBC data source.

Then you want to find out what SQL you want to send...

For the tables, you can send plain CREATE TABLE statements, but I doubt that you could save the query into the Access database from ODBC.

If you create the tables and queries beforehand, creating the query is no problem... The only thing then is to find the value of the autonumber field from Table1, and insert that into Table2. I've no idea how to do that, so I'd suggest you add a Folder field (text) to Table2. Then do

DELETE * FROM Table1; DELETE * FROM Table2;
Followed by a number of
INSERT INTO Table1 (Folder) VALUES ('myfolder1'); INSERT INTO Table2 (Account, Type, Folder) VALUES ('Account1', 'type1' +, 'myfolder1');
When you are done, do
UPDATE Table2 SET Table2.Folder_ID = Table1.Folder_ID WHERE Table1.Fol +der = Table2.Folder;