How to hide the Main Acces UI

I still think it's a good idea to post a copy of your db to help us help you.
Thanks, DBguy, posted the code to the above Post. The database is already split and would need to combine FE and BE to zip the whole DB. Thank you.
 
I agree. Help us to help you

If its your app, it may be you have modified my original code or not included all of it.
If this is from my own example app, please state the version number and the form name.
Or if its from the SaturdayBigBook app by the OP of this thread, you need to tell us
 
Thanks, DBguy, posted the code to the above Post. The database is already split and would need to combine FE and BE to zip the whole DB. Thank you.
Okay, I'll give it one shot. Are you sure you have a command button on your form called cmdRestore?
 
I agree. Help us to help you

If its your app, it may be you have modified my original code or not included all of it.
If this is from my own example app, please state the version number and the form name.
Or if its from the SaturdayBigBook app by the OP of this thread, you need to tell us

Control the Application Interface​

This is the information from the link you provided for the download below. Hope, this helps. Thank you.

Version 3.44 Updated 14/01/2020



This example shows how the Access application interface can be controlled in various ways

Some of these methods can be used to help make a database more secure.



The database is opened with a form 'floating independently' on the desktop i.e. with the access application window hidden



Buttons on the form can be used to:

• drag a borderless form to a new position


  • show / hide entire Access application window

  • show / hide navigation pane

  • show / hide ribbon

  • show / hide taskbar

  • maximise the form to fill the entire screen (no title bar & no taskbar) - this only works for a popup form

  • open another form with a related report. This shows how the print preview ribbon can be displayed whilst the report is open & hidden when it is closed

  • open / close the Visual Basic Editor (VBE)



Although it is highly unlikely that any single application would need to use all of these features, this is designed to show that all items can be toggled on / off independently without problems.



All code has been fully tested in Access 2010 & 2016 (32-bit & 64-bit) and has been widely used in various production databases for several years.



The code used can be found in the modules:


  • modDatabaseWindow / modNavPaneTaskbar / modRibbon



Some of the code is widely known e.g. hide navigation pane / ribbon.

Other parts are written by myself or other authors. Where appropriate, those authors have been acknowledged.



This example database also includes:


  • code to resize forms for any screen size & resolution in module modResize

  • additional functions in module modDesignFeatures



If you wish to use any of the code in your own projects, just copy the relevant module code including all author information as supplied



The VBA reference Visual Basic for Extensibility is required for certain additional functions listed in the module modDesignFeatures

e.g. CloseAllVBEWindows and for getting the procedure names in error handling code.

It can be omitted if you don't wish to use either of these



UPDATES:

v2.0 09/05/2018 - added code to shows ways of running a query with the application interface hidden

v3.0 02/01/2019 - added code to open a report with the application interface hidden

v3.2 13/02/2019 - fixed an issue in 64-bit Access

v3.3 04/04/2019 - added code to allow form to be dragged using mouse down event

v3.41 19/07/2019 - modified code to prevent application window being restored after clicking on taskbar icon

v3.44 14/08/2019 - various bug fixes related to code in previous update

v3.46 14/01/2020 - added additional methods of handling reports when application window is hidden





Click to download: SetWindows v3.46 (zipped - approx 2.0 MB)
 
Okay, I'll give it one shot. Are you sure you have a command button on your form called cmdRestore?
I copied the code verbatim from the examples triggered On_Load. I tried running code as is and there are more errors with the variables coming up. I did copy and paste the cmdRestore button and the on_click code and pasted into my form "Switchboard", however the on_load event event code errors before I can try the button. Thank you.
 
Is that info from my website or from this forum? A link would really help
The text mentions v3.44 but the link is for v3.46. Which do you have?

Have you checked there are no missing references on your machine?

And once again, which form are you opening that is giving you an error?
My app does have a cmdRestore button on the main form

EDIT posts crossed
OK - so are you using my original app or have you pasted code into your own app Switchboard form?
If the latter then the problem is that you don't have a cmdRestore button on your form.
Probably there will be other code that will error if you have just pasted it all into your own app.

Whilst you do not need to understand all the API calls to use this functionality, you do need to have a basic understanding of what the code does.
 
OK - so are you using my original app?
Is that info from my website or from this forum? A link would really help
The text mentions v3.44 but the link is for v3.46. Which do you have?

Have you checked there are no missing references on your machine?

And once again, which form are you opening that is giving you an error?
My app does have a cmdRestore button on the main form

This is the link.

Everything is copied verbatim and pasted to my Swithboard form "Switchboard". This my main Opening Form and Menu.

I did not see any function calls, therefore, did not copy any modules.

I have no idea how to check missing references on a machine. Thank you.
 
Is that info from my website or from this forum? A link would really help
The text mentions v3.44 but the link is for v3.46. Which do you have?

Have you checked there are no missing references on your machine?

And once again, which form are you opening that is giving you an error?
My app does have a cmdRestore button on the main form

EDIT posts crossed
OK - so are you using my original app or have you pasted code into your own app Switchboard form?
If the latter then the problem is that you don't have a cmdRestore button on your form.
Probably there will be other code that will error if you have just pasted it all into your own app.

Whilst you do not need to understand all the API calls to use this functionality, you do need to have a basic understanding of what the code does.
I will do anything you tell me to get the code to work. Thank you.
 
I'm signing off for tonight.
However, this is not code for new users of Access.
If you just copy it verbatim into your own app without thinking what it all means, then of course it will error.

You need to put some work in for yourself.
Find out how to look for missing references
Find out how to start an app without code running.
Then step through the code line by line and disable each line of code not related to your database.

Although you've used my code, I have absolutely no idea of the context you are using it within your own app

P.S. Thanks for finally supplying the link which is from my website.
I have just fixed the version disparity on that page
 
Last edited:
@nonakag
I used to use that type of code to hide the Access shell, but when I ran across this set of instructions (second post down on the page), I found out it worked for my needs most of the times, at least, compared to the much more complex and buggy API's for setwindow, etc. etc.
It may or may not be workable for your needs & situation, just bringing it to your attention as an option.
 
I'm signing off for tonight.
However, this is not code for new users of Access.
If you just copy it verbatim into your own app without thinking what it all means, then of course it will error.

You need to put some work in for yourself.
Find out how to look for missing references
Find out how to start an app without code running.
Then step through the code line by line and disable each line of code not related to your database.

Although you've used my code, I have absolutely no idea of the context you are using it within your own app

P.S. Thanks for finally supplying the link which is from my website.
I will fix the version disparity tomorrow
Ok, perhaps I should backtrack and just ask what I need. I'm have a pop-up switchboard form that loads automatically when opened. I would just like to be able to open my app without the MS Access App window to be behind it, without the Access APP icon not in the tray. I would only use a command button to unhide the Access App to perform modifications on the fly before going live with my application. Thank you.
 
@Isaac
That code works fine for hiding the ribbon/nav pane etc, all of which are covered in my example app.
Doing all of that may indeed be sufficient for many users and its what I do in most of my apps.

However, the article doesn't cover hiding the application interface itself
I agree that the API code is more complex but it isn't ' buggy' as you describe it.
 
@nonakag
I used to use that type of code to hide the Access shell, but when I ran across this set of instructions (second post down on the page), I found out it worked for my needs most of the times, at least, compared to the much more complex and buggy API's for setwindow, etc. etc.
It may or may not be workable for your needs & situation, just bringing it to your attention as an option.
Isaac, thanks. I'm using all Pop-ups and have the need to print preview and print reports.
 
Isaac, thanks. I'm using all Pop-ups and have the need to print preview and print reports.
Hopefully that set of instructions works out for you.
Good luck
 
@Isaac
That code works fine for hiding the ribbon/nav pane etc, all of which are covered in my example app.
Doing all of that may indeed be sufficient for many users and its what I do in most of my apps.

However, the article doesn't cover hiding the application interface itself
I agree that the API code is more complex but it isn't ' buggy' as you describe it.
I didn't look totally comprehensively at your code, so I can't say for sure it's the same code that I used, of course.
Some aspects looked very familiar, like sw_setwindow and part of the win API (or something like that--been a while since I used it).
The code that I used was definitely a little buggy and had to be sometimes called and re-called very frequently, it seemed.
Glad to hear that your experience has been better.

However, the article doesn't cover hiding the application interface itself
When I follow the instructions on that link, it does hide the application entirely.
 
Not quite. It shows the title bar with a maximised form. No nav pane & no ribbon.
Whilst that's absolutely fine if you want that outcome, its nothing like the effect of having a form 'floating on the desktop'

1602113252840.png
 
I guess I'm confused. The screenshot you posted has no Access shell/background application showing at all. To me it looks like basically a form floating on the desktop - like a professional app.
 
That's precisely what it is. The example app is one of the most popular apps I've uploaded both here and at my website.
The latest version is attached
 

Attachments

All I can say is that when I follow the instructions in the link I posted precisely, it definitely hides the entire Access app - whether the instructions specifically list that out or not. It leaves nothing but a floating form. And, it retains the taskbar icon (of choice).
 

Users who are viewing this thread

Back
Top Bottom