Inno script - Access 2013 runtime (1 Viewer)

JohnPapa

Registered User.
Local time
Today, 10:59
Joined
Aug 15, 2010
Messages
954
After I run the following Inno script in the Target of the icon I get

C:\VisualReminder\VR.accde /runtime

and I am assuming that it is executing the Runtime A13.

On the PC is also installed Microsoft 365, with a higher version of Access.

On the top of the screen, for some reason there appear the tabs of the open forms. Is this normal?


Code:
; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!


#define MyAppName "myVR"
#define MyAppVersion "3.0"
#define MyAppPublisher "Kosmos Business Systems Ltd"
#define MyAppURL "https://www.KosmosBusiness.com"
#define MyAppExeName "VR.accde"
#define MyAppIcoName "Reminder.ico"


[Setup]
; NOTE: The value of AppId uniquely identifies this application.
; Do not use the same AppId value in installers for other applications.
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
AppId={{4F20D810-63C4-4EB6-9A1D-BA36AFFFD4BC}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName= "C:\VisualReminder"
UsePreviousAppDir=yes
DisableDirPage=no
DefaultGroupName=VisualReminder {#MyAppVersion}
DisableProgramGroupPage=yes
OutputBaseFilename=MyVR-Setup
Compression=lzma
SolidCompression=yes
PrivilegesRequired=admin
LicenseFile=C:\VisualReminder\InnoSetup\VR-License.txt


[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"


[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked


[Files]
Source: "C:\VisualReminder\InnoSetup\VR.accde"; DestDir: "{app}"; Flags: ignoreversion replacesameversion
Source: "C:\VisualReminder\InnoSetup\VR_be.accdb"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\VisualReminder\InnoSetup\AccessRuntime_x86_en-us.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\VisualReminder\InnoSetup\Reminder.ico"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\VisualReminder\InnoSetup\TemplateClient.xlsx"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\VisualReminder\InnoSetup\TemplateProduct.xlsx"; DestDir: "{app}"; Flags: ignoreversion


[Icons]
Name: "{autodesktop}\VisualReminder"; Filename: "{app}\VR.accde"; Parameters: "/runtime"; IconFilename: "{app}\{#MyAppIcoName}"; Tasks: desktopicon


[Code]
function PrepareToInstall(var NeedsRestart: Boolean): String;
 var
  CurVer: string;
  key: string;
  ResultCode: Integer;
 begin
   if RegQueryStringValue(HKEY_CLASSES_ROOT, '\Access.Application\CurVer','', CurVer) and ( CurVer = 'Access.Application.15' ) then begin
    // Successfully read the value
    //  MsgBox('Access Version: ' + CurVer ,mbInformation, MB_OK);
    end else begin
        ExtractTemporaryFile('AccessRuntime_x86_en-us.exe');
        if Exec(ExpandConstant('{tmp}\AccessRuntime_x86_en-us.exe'), '', '', SW_HIDE, ewWaitUntilTerminated, ResultCode) then begin


            //msgbox('AccessRuntime already installed or completed installing successfully.', mbInformation, MB_OK);
        end else begin
            msgbox('AccessRuntime installer failed please contact support.' + SysErrorMessage(ResultCode), mbInformation, MB_OK );     
        end; 
    end;
end;


[Run]
Filename: "{app}\VR.accde"; Description: "Open Visual Reminder"; Flags: postinstall shellexec skipifsilent ; Parameters: "/runtime"
 

Minty

AWF VIP
Local time
Today, 08:59
Joined
Jul 26, 2013
Messages
10,355
I think that is an Access setting - "Tabbed Documents" - I've never used code to change that setting, but someone must have.
1635265821966.png
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 04:59
Joined
Feb 19, 2002
Messages
42,981
The tabbed documents setting cannot be changed on the fly. You have to change the setting and close the database. When you reopen it, the new setting is in force.

When you open the same database with the full version of Access, is it still in tab view? How about on different computers? Maybe you switched to this view before creating the .file you distributed.
 

isladogs

MVP / VIP
Local time
Today, 08:59
Joined
Jan 14, 2017
Messages
18,186
You can change the setting using code:

Code:
CurrentDb.Properties("UseMDIMode") = 0 'tabbed documents

CurrentDb.Properties("UseMDIMode") = 1 'overlapping windows

You still need to restart the database or you can just compact & repair which does the same thing
 

NauticalGent

Ignore List Poster Boy
Local time
Today, 04:59
Joined
Apr 27, 2015
Messages
6,286
The line of code you need is: CurrentDb.Porperties("ShowDocumentTabs") = False/True

I have a sub in my FE that sets this and other properties based on if the User is Admin or not. I use a VBScript to Open Access, run the sub, close and then re-open Access as Pat described.

Edit: Colin and I crossed streams...
 

isladogs

MVP / VIP
Local time
Today, 08:59
Joined
Jan 14, 2017
Messages
18,186
Going back across the river ....
Setting CurrentDb.Properties("ShowDocumentTabs") = True/False ticks/unticks the Display Document Tabs checkbox below

1635273939909.png


It has no effect if you are using overlapping windows display option
If you want to change between overlapping windows & tabbed documents, you need to alter the UseMDIMode property
 

NauticalGent

Ignore List Poster Boy
Local time
Today, 04:59
Joined
Apr 27, 2015
Messages
6,286
Good to know...I thought the OP was only interested in turning the tabs off and on. Learn something new everyday.
 

isladogs

MVP / VIP
Local time
Today, 08:59
Joined
Jan 14, 2017
Messages
18,186
Good to know...I thought the OP was only interested in turning the tabs off and on. Learn something new everyday.
You're welcome. Not sure exactly what the OP wants but at least they know what can be done
I just wish there was a registry setting that allowed me to set Overlapping Windows as the default as I hate Tabbed Documents display!
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 04:59
Joined
Feb 19, 2002
Messages
42,981
I also dislike the tabbed setting. It isn't terrible as a user interface so I might use it that way if it could be toggled without closing and reopening the database. I don't know about others but when I'm debugging I sometimes have half a dozen windows open so I can look at various tables/queries and you just can't do that with the tab view.
 

isladogs

MVP / VIP
Local time
Today, 08:59
Joined
Jan 14, 2017
Messages
18,186
I also dislike the tabbed setting. It isn't terrible as a user interface so I might use it that way if it could be toggled without closing and reopening the database. I don't know about others but when I'm debugging I sometimes have half a dozen windows open so I can look at various tables/queries and you just can't do that with the tab view.
That's also one of the reasons why I use Overlapping Windows.
The other point is that I don't always forms to be maximised nor do I want them to be popups.
With tabbed documents they are always maximised unless they are popups.

As already mentioned, compacting allows you to change many settings (including this) without physically closing the database
 

CJ_London

Super Moderator
Staff member
Local time
Today, 08:59
Joined
Feb 19, 2013
Messages
16,553
I have experimented with using tabbed but hiding the tabs and ribbon etc so it looks like a popup form. (only the access window frame remains) So one form with navigation options and use subforms to display data - overall the look is a bit like a web browser. Benefit is you don't have to worry about hiding the access window!

But for development - overlapping every time
 

Users who are viewing this thread

Top Bottom