Открыть Форму в другой БДПо материалам: https://www.cyberforum.ru/ms-access/thread3123932.html Private Sub FormOpenFromOtherApp() Dim app As New Access.Application Dim frm As Form Dim ctrl As Control Dim sOtherAppPath$ sOtherAppPath = CurrentProject.Path & "\x цифра.accde" app.OpenCurrentDatabase sOtherAppPath app.DoCmd.OpenForm "Form1" app.Visible = True Set frm = app.Forms("Form1") 'Делаем доступными все кнопки формы: For Each ctrl In frm.Controls If ctrl.ControlType = acCommandButton Then If ctrl.Enabled = False Then ctrl.Enabled = True 'Debug.Print "Кнопка: " & ctrl.Name & " - теперь доступна." End If End If Next ctrl Set ctrl = Nothing Set frm = Nothing Set app = Nothing End Sub |
|||
L.E. 09.08.2023 |