I am exporting all my tables with the folloiwng function:
Public Function ExportAllTablesP(DBName As String, strPassword As String) As Boolean
' call it so : ExportAllTablesP "C:\be\be.mdb", "secret"
Dim FrontDB As Database, BackDB As Database, Tbl As DAO.TableDef
Set FrontDB = CurrentDb
Set BackDB = OpenDatabase(DBName, True, False, ";PWD=" & strPassword)
For Each Tbl In FrontDB.TableDefs
If Tbl.Attributes = 0 Then
DoCmd.TransferDatabase acExport, "Microsoft Access", BackDB.Name, acTable, Tbl.Name, Tbl.Name
End If
Next
BackDB.Close
FrontDB.Close
End Function
I need also to export to this database also certain forms and macros.For example:
DoCmd.TransferDatabase acExport, "Microsoft Access", "C:\BE\Lest & Format(Date, "dd-mm-yyyy") & ".mdb", acForm, "FrmStock", "FrmStock"
Is there any similar function allowing this export ?
Public Function ExportAllTablesP(DBName As String, strPassword As String) As Boolean
' call it so : ExportAllTablesP "C:\be\be.mdb", "secret"
Dim FrontDB As Database, BackDB As Database, Tbl As DAO.TableDef
Set FrontDB = CurrentDb
Set BackDB = OpenDatabase(DBName, True, False, ";PWD=" & strPassword)
For Each Tbl In FrontDB.TableDefs
If Tbl.Attributes = 0 Then
DoCmd.TransferDatabase acExport, "Microsoft Access", BackDB.Name, acTable, Tbl.Name, Tbl.Name
End If
Next
BackDB.Close
FrontDB.Close
End Function
I need also to export to this database also certain forms and macros.For example:
DoCmd.TransferDatabase acExport, "Microsoft Access", "C:\BE\Lest & Format(Date, "dd-mm-yyyy") & ".mdb", acForm, "FrmStock", "FrmStock"
Is there any similar function allowing this export ?