Sub SendBackEndObjects(strDBName As String, strPWD As String)
Dim wrkDefault As Workspace, dbsNew As DAO.Database
Set wrkDefault = DBEngine.Workspaces(0)
Set dbsNew = wrkDefault.OpenDatabase(strDBName, False, False, IIf(strPWD = "", "", ";pwd=" & strPWD))
'Export the needed tables and queries
DoCmd.TransferDatabase acExport, "Microsoft Access", "" & dbsNew.Name & "", acForm, "frmSplash", "frmSplash", , True
DoCmd.TransferDatabase acExport, "Microsoft Access", "" & dbsNew.Name & "", acForm, "dlgBPK", "dlgBPK", , True
DoCmd.TransferDatabase acExport, "Microsoft Access", "" & dbsNew.Name & "", acModule, "Bypass Key Functions", "Bypass Key Functions", , True
DoCmd.TransferDatabase acExport, "Microsoft Access", "" & dbsNew.Name & "", acTable, "USysRibbons", "USysRibbons", False, True
dbsNew.Close
Set dbsNew = Nothing
Set wrkDefault = Nothing
End Sub
Function DeleteObjectFromDatabase(dbs As DAO.Database, ObjectName as string, ObjectType as acObjectType) As Boolean
On Error GoTo Err_Handler
dbs.DoCmd.DeleteObject ObjectType, ObjectName
Err_Handler
'/ trap errors here
End Function
That's air code so you'd have to ensure it works correctly. Set appAccess = CreateObject("Access.Application")
appAccess.OpenCurrentDatabase strDB, False, strPWD
Why would you delete them, rather than just update them? I'm curious ...