Access form in Office 365 is minimized when opening from Excel using Docmd.Openform (1 Viewer)

BBest

New member
Local time
Today, 05:57
Joined
Nov 22, 2025
Messages
6
Hi, I could use some help with this. Just ran out of things to try. I am opening a form in dialog mode from an Excel spreadsheet in Office 365 and it always opens minimized. I have done this many times and it has always opened on the screen without additional clicks. When I make the call to DoCmd.Openform in Office 365 you can see Access is open in the taskbar minimized and you have to click on it for the form to show. I don’t want my users having to click on the app to open it, actually it is hard to even notice it is there. The code I have works fine in Access 2024, 2021 and 2019 but not in Office 365. The Access form is set to PopUp = Yes, Modal = Yes, Auto Center = Yes and Auto Resize = Yes. In Access I have added code to the load event on the form attempting to make it show but nothing is working. Added Docmd.Maximize, DoCmd.Move both work only after icon clicked in taskbar.

I also made a blank form with one field and no code and that gives me the same result when it is opened from Excel.

I tried this on 3 different win11 machines with Office 365, one just reloaded and only office 365 added, and have the exact same results.


Am I missing something that has been added to Office 365 or does something need to be changed in my code?



Code in Excel
Dim accApp As Access.Application

Set accApp = New Access.Application

With accApp
.Visible = True ' false would be preferable but it doesn’t even show on screen in 365, true works fine in all other versions.

.OpenCurrentDatabase AccessDbFilePath
.DoCmd.OpenForm FormName:=FormReportStr, WindowMode:=acDialog, WhereCondition:=WhereStr, OpenArgs:=ArgsStr ' Open form in dialog mode
End With

Since the form is being opened in acDialog mode this code stops after the DoCmd.Openform and sits there until the form running in access is closed.

Any help would be appreciated!
 
I thought I had seen it before. :(
 
To be fair, new users can’t post links but they should still inform us of cross posting. The OP has had several responses at the other forum
 
To be fair, new users can’t post links but they should still inform us of cross posting. The OP has had several responses at the other forum
I'm just trying to find a solution to my problem. I'm sorry I posted this question on 2 sites. I was unaware that putting it on two different forums was a problem. My thinking was that different people are going to the different sites and maybe someone could help me. I have been using access since it first came out and this is the first time I reached out for help. I haven't found a solution to my issue. I have created a new access db with one form and only the call to it in excel. It actually worked, no minimizing! Tried making the call to original access db and it worked then in my testing it was minimized again with no changes made. Just opening and closing access from the spreadsheet. I then went back to the test, it is now minimizing in the test and I can't get it to work again. Made a new DB and spreadsheet like the first time and it is still minimizing. There is something in the registry or in some setting causing the issue. I could still use some input as to why this is happening. Thanks
 
The issue isn't specifically about cross posting itself but not stating you have done so.

Please read this article about the etiquette related to cross posting.

Then please go to the other forum and add a link back to this thread
 
Can you upload a simple repro database and example Excel file that demonstrates the issue
 
The link was already there. So here is a very cutdown version of what is happening. There is an access Db and an excel spreadsheet. The path in excel to the access db is c:\ONP. Thanks for any help and sorry for the confusion with the posting. I would appreciate any help with this. More info in readme. Thanks
 

Attachments

Tested in 365 Current Channel version 2510 build 19328.20244 64-bit

It works reliably and consistently for me with .visible = true. Double click anywhere in Excel. Access opens specified database & opens the form normally.

I had moved it to a different folder and set the location as trusted. Make sure you have also trusted the location in both Access and Excel

I didn't expect it to work with .visible = false. However I hadn't expected doing that would cause Excel to freeze.

After reverting to visible= true, Access again opened but with the taskbar icon flashing. When that was clicked, the form wad opened normally.

I've seen similar behavior since at least Office 2003 where automation code triggered the opened app to be stuck on the taskbar.
You may need to decompile or create a fresh copy to restore the fully working behaviour
 
Ok, so after the taskbar icon was flashing did you ever get it to open normally again. By normal I mean without having to click on the icon? That is my main problem. There will be a lot of volunteers using this app for a homeless shelter and I know they won't see it and think the app is hung up.

Thanks for the feedback!
 
i suggested not to Hide the access main window but to move it Off screen.
this is working on my test.
 

Attachments

Last edited:
Ok, so after the taskbar icon was flashing did you ever get it to open normally again. By normal I mean without having to click on the icon? That is my main problem. There will be a lot of volunteers using this app for a homeless shelter and I know they won't see it and think the app is hung up.

Yes I did!
Its now working perfectly again for me.
I changed the order of your code and added an extra line .UserControl=True
It now also works with .Visible = False though that makes no difference as Access is still displayed

As @arnelgp suggests, the Access interface (not the form) could be moved off screen.
I did so by dragging to a secondary monitor (which your users presumably wouldn't have) rather than using code

Code:
 With accApp
            .OpenCurrentDatabase DbStr
            .Visible = False 'Access still appears though it could be dragged off screen
            .UserControl = True
            .DoCmd.OpenForm FormName:=FormStr, WindowMode:=acDialog   ' Open form in dialog mode
    End With

NOTE: without the .UserControl line, setting .Visible=False causes Excel to hang.
I had to close it using Task Manager and also end the background process of Access that was running.
 
Thanks for the feedback. I'm going to give this a try, I hope this will fix this nagging problem. I'll let you know how it works. The funny part about this is that it would work fine and then for whatever reason the flashing icon would start and then at some point it would start working again. I am able to move the screen off using SetWindowPos Lib suggested by jojowhite. Both solutions to get the access app off the screen work good.

Thanks for looking into this!
 
Everything looked good today in testing and the app will be in use on Wednesday night so if there are any issues it will surely show up then. Thanks again for the help.
 
Might want to mark threads in *both* sites as Solved when you are happy with the outcome?
 

Users who are viewing this thread

Back
Top Bottom