How to hide Database Objects and Show once closed

OminousDaark

New member
Local time
Tomorrow, 00:12
Joined
Dec 22, 2013
Messages
8
Hello, I was wondering if anyone can help me out - So I have a database with a main menu which opens up on start-up it works fine and all but I want to go the extra step, I wish to disable / hide the ribbons (Top and Bottom) - Or Hide the whole Microsoft Access Window and display my form with the desktop behind it.

The next thing is once I click the X or the button to close the form I want Microsoft Access to appear again as in everything to show itself again.

If anyone can help me out that would be great. Probably the wrong place to be saying this but - Little to no code would be awesome IF possible if not the less the better. Thanks a lot (I'm pretty new to this.)
 
You need to create a module and have the following code

Code:
Private Declare Function ShowWindowAsync Lib "USER32" (ByVal hWnd As Long, ByVal nCmdShow As Long) As Boolean
 
 
Public Sub HideAccess()
    ShowWindowAsync Application.hWndAccessApp(), 0    
End Sub
 
Public Sub ShowAccess()
    ShowWindowAsync Application.hWndAccessApp(), 5    
End Sub

Then call HideAccess from your main menu form on open event and close Access on your main menu form close event.

Note that your main menu form (an perhaps others) will need to be set to popup and modal, otherwise it will disappear when the access window is hidden
 

Users who are viewing this thread

Back
Top Bottom