I have an mde app that runs a function from a class module when the mde is launched. The function does "its job" and ends so I'd like to do that "quietly". As it is, Access flashes its startup screen. Anyway I can suppress that?
I have an mde app that runs a function from a class module when the mde is launched. The function does "its job" and ends so I'd like to do that "quietly". As it is, Access flashes its startup screen. Anyway I can suppress that?
I haven't used an MDE for years but this works with both ACCDB and ACCDE.
Create a new BMP file with the same name as your database and save it in the same folder.
Change the size to 1*1 pixels. The file doesn't need to contain an image as you won't see it
Run the database from a shortcut or double click the file. No Access splash screen.
I always replace it with my own app splash screen.
I can't get to this until later this evening....... you'll be sound asleep by then but I'll post the results for your morning viewing pleasure.
Bill
I got rid of the flash using the 1x1 pixels BMP file you suggested. However, I've not been able to suppress flashing of the Access Window as the app quickly does its task.
Not sure I understand.
Do you mean, the Access splash screen no longer appears but the application window itself flashes briefly?
As you have A2013 can you also try with ACCDB/ACCDE
Yes. I converted and ran ACCDE and it does that same thing.but the application window itself flashes briefly?
Sorry Colin, I was too quick in reading your post number 6. It's NOT the application window but rather the "Access Window". The app itself doesn't have any forms it only runs a class module containing a function to carry out a task quickly and then exits via "DoCmd.Quit". The app startup is via a "Run Function" in the "Autoexec" macro.
When Access based apps "Run" as objects of a Windows "Scheduled Tasks" the Access window doesn't show at all. If I knew how to create a user interface to manually run the app as a Scheduled task from a windows keyboard shortcut I could go that route?
(Edit) Colin, I have to leave for the day (Thursday) but I will see if I can mimic the behavior of a Scheduled task started manually by use of a DOS Run command from a Bat file, maybe even if before you retire for the evening.
(Edit2) Had a chance to try this batch command (code) before leaving for the day. Flashes the DOS command window instead of the Access Window.
Code:c:\Program Files(x86)\Microsoft\Microsoft Office\Office15\MSACCESS.EXE "C:\eRep\kScan.accdb"
Last edited by GraeagleBill; 06-07-2018 at 09:54 AM.
Hi Bill
I'm unclear what you mean by the Access window. Perhaps we're not using the same terminology?
Are you trying to hide all the background apart from your main form?
If so, this link should help https://www.accessforums.net/showthread.php?t=69856
Yes.Are you trying to hide all the background
To be clear about terminology: If one were to open the Windows start menu, navigate to "Microsoft Office", expand, find and click on "Access 2013" one would then be looking at the "Access Window".
The API's that are somewhat readily available to control the "Access Window" don't apply with my issue here because it's too late by the time my earliest code has an opportunity to control over its behavior.
The only time I've ever been able to run an app without any display of the "Access Window" is when the app was launched via the Windows "Scheduled Task" facility. If there's a way to trigger the execution of a scheduled task manually from some sort of keyboard hot key that would be great but I don't know of any at the moment.
Bill
If you open an Access file by double clicking it or by using a desktop shortcut to the file, you shouldn't see the Access menu you have in your picture.
However clicking on the Access icon will always lead to the initial menu screen before opening the last opened database (unless you disable that feature)
You just need to open the file direct from explorer or a shortcut.
As I said in my last reply, it is also possible to hide the application window completely and have apps that 'float on the desktop'
Colin, I had to laugh when I read your post this morning in that my first thought was that I needed to post somewhere that I needed help in how to adequately describing an issue.....
So, here's my attempt today: I took a screenshot of the upper left corner of one of my apps (accde) opened with a shortcut. The form DOES NOT have any code of the type you offered in post number 10. I've highlighted in the pic below what I've always considered to be the component parts of a window in the hopes of clearing up what I mean when I refer to the "ACCESS Window".
Now, I have another app THAT DOES have code of the type you offered in post number 10 that minimizes the "ACCESS Window" as soon as the initial form opens, (fSetAccessWindow (SW_SHOWMINIMIZED)). This app also has a 1x1 pixel BMP file like you suggested in post #2 that essentially suppresses the app's opening flash. However, the "ACCESS Window" flashes briefly but NOT long enough to be a problematic distraction. In the case of what the current issue is all about, that ANY flash IS a problematic distraction in that there IS NO form being displayed, only a function that does its job and quits.
I'm beginning to think there's no solution to what I'm asking.
Your thoughts and suggestions are greatly appreciated.
Bill
As we talked about yesterday, it hasn't been my experience that apps run from Scheduled Tasks don't show, but research reveals that may relate to the user the app is run under. In any case, a bat file like this will run the scheduled task:
SCHTASKS /Run /TN "TaskName"
I stand corrected, the Access Window still flashes even when run as a Scheduled task. Still good to know how to manually start a scheduled task via a bat file.
It seems that the minimum flash I can achieve is to run the app from a bat file that only flashes the Cmd Prompt window. If Win 10 would retain a resizing of the default Cmd Prompt window I could make it small enough that it would hardly be noticed. Strangely, even if the Cmd Prompt is opened with a shortcut specifying to open Minimized it stall flashes briefly.
Must be time for a nap!
Thanks Paul,
Bill