Application window not saving as maximized

Jaye7

Well-known Member
Joined
Jul 7, 2010
Messages
1,066
I have one database and the application window and vba screens are not saving as maximized.

I tried several scripts to make it save as maximized but when I close the database and reopen it it is set to restore.

Code:
Access.RunCommand acCmdAppMaximize

also tried code from the following link

API: Manipulate Access Window

I think that it may be cased by opening it from another database, I am using the following script.

Code:
Dim strInput As String
    strInput = "C:\DBase\KLIKSTORES PURCHASING SS NOT LIVE.accdb" 'This references a text box on my form that has a file path
    Application.FollowHyperlink strInput, , True 'Setting this to True opens the database in another window

Dim fso

Set fso = CreateObject("Scripting.FileSystemObject")
    
    If fso.FileExists("KLIKSTORES PURCHASING SS NOT LIVE.laccdb") Then
           
            'MsgBox "Access is open!"
            
            Dim OtherDB As Object
            sOther = "C:\DBase\KLIKSTORES PURCHASING SS NOT LIVE.accdb"
            Set OtherDB = GetObject(sOther)

OtherDB.Forms![ItemFilter]![txtReturnToForm] = "Mainswitch"
                
            Set OtherDB = Nothing
            
            Else
            'MsgBox "not open"
    End If
 
Last edited:

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney

Forum statistics

Threads
1,223,275
Messages
6,171,121
Members
452,381
Latest member
Nova88

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top