internal void OpenAccessObject(AccessObjectModel report)
        {
            try
            {
                var app  = GetCurrentApplication();
                var name = report.FullName ?? report.Name;

                switch (report.Type)
                {
                case MSAccess.AcObjectType.acReport:
                    app.DoCmd.OpenReport(name);
                    break;

                case MSAccess.AcObjectType.acTable:
                    app.DoCmd.OpenTable(name, MSAccess.AcView.acViewNormal, MSAccess.AcOpenDataMode.acReadOnly);
                    break;

                case MSAccess.AcObjectType.acServerView:
                    app.DoCmd.OpenView(name, MSAccess.AcView.acViewNormal, MSAccess.AcOpenDataMode.acReadOnly);
                    break;

                case MSAccess.AcObjectType.acStoredProcedure:
                    app.DoCmd.OpenStoredProcedure(name, MSAccess.AcView.acViewNormal, MSAccess.AcOpenDataMode.acReadOnly);
                    break;

                case MSAccess.AcObjectType.acQuery:
                    app.DoCmd.OpenQuery(name, MSAccess.AcView.acViewNormal, MSAccess.AcOpenDataMode.acReadOnly);
                    break;

                case MSAccess.AcObjectType.acFunction:
                    app.DoCmd.OpenFunction(name, MSAccess.AcView.acViewNormal, MSAccess.AcOpenDataMode.acReadOnly);
                    break;

                case MSAccess.AcObjectType.acDiagram:
                    app.DoCmd.OpenDiagram(name);
                    break;

                case MSAccess.AcObjectType.acMacro:
                    app.DoCmd.RunMacro(name, 1, true);
                    break;

                default:
                    throw new NotImplementedException($"Opener for {report.TypeName} not implemented.");
                }

                RobotWin32.BringWindowToFront((IntPtr)app.hWndAccessApp());
            }
            catch (Exception ex)
            {
                RobotMessageBox.Show(ex.Message);
            }
        }
        private void OpenForm(AccessObjectModel formToLoad, bool openInDesigner, MSAccess.Application application)
        {
            try
            {
                var formName = formToLoad.FullName ?? formToLoad.Name;
                application.DoCmd.OpenForm(
                    formName,
                    openInDesigner ? MSAccess.AcFormView.acDesign : MSAccess.AcFormView.acNormal
                    );

                var form = application.Forms[formName];
                form.SetFocus();
                RobotWin32.BringWindowToFront((IntPtr)form.Hwnd);
            }
            catch (Exception ex)
            {
                RobotMessageBox.Show(ex.Message);
            }
        }