INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS
Come Join Us!
Are you a
Computer / IT professional?
Join Tek-Tips now!
- Talk With Other Members
- Be Notified Of Responses
To Your Posts
- Keyword Search
- One-Click Access To Your
- Automated Signatures
On Your Posts
- Best Of All, It's Free!
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.
Partner With Us!
"Best Of Breed" Forums Add Stickiness To Your Site
(Download This Button Today!)
"...Since using forums in my early days 10 years ago in CompuServe, one had to log back on and sometimes wait days for a response. Now I get a response e-mailed to me which I can click a link and go right back to exactly where My post was..."
Where in the world do Tek-Tips members come from?
How do I hide the database application background shell so only my forms are displayed
Posted: 26 Oct 11 (Edited 3 Jan 12)
If like me you are used to developing many applications in Access and have been used to ticking a box on the startup options in Access 2003, you've probably been pulling your hair out trying to do this simple task in Access 2010.
Firstly I must point out this is not a solution per sae, it is a work round in a specific environment.
MS seem to have made a step backwards with regard to application development in Access 2010 and removed this simple start up option tick box!
So ensure you understand this statement before trying to implement this 'fudge'.
Every form in your application MUST be set to 'pop-up' and 'modal' (with the exception of sub-forms)
So if your application requires non-modal forms, you CANNOT hide the Access application DB shell!
OK, so with that in mind, and ensuring ALL your forms are 'modal' simply add the following to the main module (Global Code)
Declare Function apiShowWindow Lib "user32" Alias "ShowWindow" (ByVal hWnd As Long, ByVal nCmdShow As Long) As Long
This declares a function for use from the windows API "user32" library.
Then in your main form of the application add the following to the 'form_open' form event handler procedure
Dim lWin As Long
lWin = apiShowWindow(Application.hWndAccessApp, 0)
It's worth noting you can unhide the DB window with
lWin = apiShowWindow(Application.hWndAccessApp, 1)
Ensure your application has a way of exiting, otherwise you will end up with running background processes of your Access DB!
The easiest way is to put
on the 'form_close' event handler of the main application form ensuring that the close button is available on the form!
I then hide/show the main form with
as appropriate so the main form is only ever closed when the user needs to exit the application.
me.visible = True/False
Of course feel free to use it any way you wish.
Hope this is of use and helps you avoid the wasted hours I spent working all this out!
Back to Microsoft: Access Other topics FAQ Index
Back to Microsoft: Access Other topics Forum
Join Tek-Tips® Today!
Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.
Here's Why Members Love Tek-Tips Forums:
- Talk To Other Members
- Notification Of Responses To Questions
- Favorite Forums One Click Access
- Keyword Search Of All Posts, And More...
Register now while it's still free!
Already a member? Close this window and log in.
Join Us Close