Option Compare Database Option Private Module Option Explicit 'Export a local table: definition (schema), data (is asked), properties, ## stored procedures? ## Public Sub ExportTable(ByVal tbl_name As String, _ ByVal dirpath As String, _ Optional withData As Boolean = True) On Error GoTo err Dim file_path As String dirpath = norm_dir_path(dirpath) mktree dirpath file_path = joinpaths(dirpath, to_filename(tbl_name) & ".xml") Application.ExportXML _ ObjectType:=acExportTable, _ DataSource:=tbl_name, _ DataTarget:=file_path, _ encoding:=acUTF8, _ OtherFlags:=acExportAllTableAndFieldProperties + acEmbedSchema, _ WhereCondition:="(" & CInt(withData) & ")" logger "ExportTable", "DEBUG", "Local Table " & tbl_name & " exported (withData=" & withData & ") to " & file_path Exit Sub err: logger "ExportTable", "CRITICAL", "Unable to export " & tbl_name & " [" & err.Description & "]" End Sub Public Sub ImportTable(ByVal file_path As String) On Error GoTo err logger "ImportTable", "DEBUG", "Try to import local table from " & file_path file_path = norm_path(file_path) Application.ImportXML file_path, acStructureAndData logger "ImportTable", "DEBUG", "> imported" Exit Sub err: logger "ImportTable", "CRITICAL", "Unable to import " & file_path & " [" & err.Description & "]" End Sub