بالمرفق تجارب حاولت لكن لم تنجح
Dim App As Access.Application, strPath As String
Set App = New Access.Application
strPath = Application.CurrentProject.Path & "\AlWathiq.accdb"
'DoCmd.TransferDatabase acExport, "Microsoft Access", strPath, acForm, "Form2", "Form2", False
Dim strAccessExe As String, strDB As String
'Define as Static so the instance of Access
'doesn't close when the procedure ends.
Static acc As Access.Application
Dim db As DAO.Database
Dim strDbName As String
'The path and filename of the DB to open.
strDbName = GetDBDir & strPath
Set acc = New Access.Application
acc.Visible = True
Set db = acc.DBEngine.OpenDatabase(strDbName, False, False, ";PWD=123")
acc.OpenCurrentDatabase strDbName
acc.RunCommand acCmdAppMaximize
'DoCmd.TransferDatabase acExport, "Microsoft Access", strPath, acForm, "Form2", "Form2", False
db.Close
Set db = Nothing
'With App
' .DoCmd.RunCommand acCmdAppMinimize
' .OpenCurrentDatabase strPath, , "123"
' .DoCmd.Maximize
' .Visible = True
'End With
'Set App = Nothing
أطمع في مساعدة أستاذي الكبير جعفر
12.accdb