VBA code to copy table structure and data from one access database to another. Right now I have a database that contains liked SQL tables. If I want to analyze data offline, I simply just cannot copy the database as another. SQL tables. Could someone please help me in developing VBA code that will copy the table structure and data to another. The tables being copied should have the same name. Right now I have some code bits for exporting queries, macros, etc to an offline database defined by the variable qa. Path see code below. I want to follow the same logic of copying the table structure and data of these linked SQL tables that I can insert into the code below. Postgres_Plus_Advanced_Server_Replication_Server_Users_Guide-35.jpg' alt='How To Install Xdb Manually Definition' title='How To Install Xdb Manually Definition' />Right now I am using a macro called z copy tables to peform this task, where essentially I am using artificially created queries to output the data of these linked tables and then copying these queries outputs as data inputs to my offline tables. I think this is extremely inefficient especially if new linked SQL tables are created that I have to keep track of it. I believe VBA is the way to go. Install Face Packs Football Manager 2012. I have attached an example of one line of the macro below Transfer Type Export. Database Type Microsoft Access. Database Name C Documents and SettingssanjaygDesktopqa. Object Type Table. Source copy Test The name of the table is Test and I have created query copy Test to output table Test data. Destination Test The new name of the table is the same as the name of the linked table. Structure Only No. I would have to do this about 1. This means I would have to create 1. Path. Please help. Sub exportdbobjects. Dim db As DAO. Database, qdf As DAO. Query. Def, qa. Path As String, j As Integer, rpt, mdl, frm, mac. On Error Go. To Proc. Errqa. Path C Documents and SettingssanjaygDesktopqa. Set db Current. Db For Each qdf In db. Query. Defs If Leftqdf. Name, 1 lt Then Do. Cmd. Transfer. Database ac. Export, Microsoft Access, qa. Path, ac. Query, qdf. Name, qdf. Name End If. Next. For j 0 To db. ContainersReports. Documents. Count 1 rpt db. ContainersReports. Documentsj. Name Do. Cmd. Transfer. Database ac. Export, Microsoft Access, qa. Path, ac. Report, rpt, rpt. Next. For j 0 To db. ContainersModules. Documents. Count 1 mdl db. ContainersModules. Documentsj. Name Do. Cmd. Transfer. Database ac. Export, Microsoft Access, qa. Path, ac. Module, mdl, mdl. Next. For j 0 To db. ContainersScripts. Documents. Count 1 mac db. ContainersScripts. Documentsj. Name Do. Cmd. Transfer. Database ac. Export, Microsoft Access, qa. Path, ac. Macro, mac, mac. Next. For j 0 To db. ContainersForms. Documents. Count 1 frm db. ContainersForms. Documentsj. Name Do. Cmd. Transfer. Database ac. Export, Microsoft Access, qa. Path, ac. Form, frm, frm. Next. Do. Cmd. Run. Macro z copy tablesMsg. Box Finished Exporting Objects. Proc. Exit On Error Resume Next Exit Sub. Proc. Err Msg. Box Err. Description Resume Proc. Exit. End Sub. Select all. Open in new window.