Question Hiding Access frame window (1 Viewer)

Rob Ross

Registered User.
Local time
Yesterday, 19:06
Joined
May 24, 2012
Messages
28
Is there a way to hide the main access window and only show the form or report that is selected. I don't want the users to see the program itself or be able to get to the data without using the forms that have been designed. I have built a database to replace an old one that used ASP pages to access the database and I would like to get away from that if possible.
 

liddlem

Registered User.
Local time
Today, 00:06
Joined
May 16, 2003
Messages
339
in short - Yes, but instructions on how to that differ, depending what version of access you are using. Search the forum for accdb and mde files for your version answer
 

Trevor G

Registered User.
Local time
Today, 00:06
Joined
Oct 1, 2009
Messages
2,341
Is there a way to hide the main access window and only show the form or report that is selected. I don't want the users to see the program itself or be able to get to the data without using the forms that have been designed. I have built a database to replace an old one that used ASP pages to access the database and I would like to get away from that if possible.

Look at splitting your database so you can have a front end which will be your forms and reports and the back end tables are located somewhere else. A tutorial from YouTube should help you

http://www.youtube.com/watch?v=njV45CbqBe4
 

NigelShaw

Registered User.
Local time
Today, 00:06
Joined
Jan 11, 2008
Messages
1,573
Look at splitting your database so you can have a front end which will be your forms and reports and the back end tables are located somewhere else. A tutorial from YouTube should help you

http://www.youtube.com/watch?v=njV45CbqBe4

But splitting the back end will not take away the fact that the Access window is visible, it merely moves the tables to a separate database! The Access window will still be visible when running the 'front end'.....

This should hide and show the access window-

Code:
'-- Constants used by ShowWindow
Const SW_HIDE = 0
Const SW_NORMAL = 1
Const SW_MINIMIZED = 2
Const SW_MAXIMIZED = 3
 
Private Declare Function ShowWindow Lib "user32" _
(ByVal hwnd As Long, ByVal nCmdShow As Long) As Long

put this in your opening form ( to hide the Access window )
Code:
Private Sub Form_Open(Cancel As Integer)
Call ShowWindow(hWndAccessApp, SW_HIDE)
DoCmd.OpenForm "Switchboard", windowmode:=acDialog
End Sub

reset the Access window
Code:
Dim lngRetCode As Long
lngRetCode = ShowWindow(hWndAccessApp, SW_MAXIMIZED)

Would be worth quitting the application whe nthe user closes the form to prevent the window opening again-

Code:
Application.Quit

please note, this will hide the window down to the task bar. The user 'could' click it and the db window still appear. I have a routine that will hide it completely but once its hidden, its hidden. In my 'testing the routine out days', i Hid the window completely then couldnt get it back to continue. The only thing i could do was Task Manager / End Task thus losing all of my work that i hadnt saved at the time 'Damn' lol.

To safe guard that, i added in a systray so when the window is hidden, an icon appears in the systray that allows me to continue with tasks.


hope that helps :)


Nidge
 

brampeirs

Registered User.
Local time
Today, 01:06
Joined
Jul 29, 2011
Messages
20
Hello, thanks for the code. When I use the code, the Icon in the taskbar is gone? Is there a way to keep the icon in the taskbar?

Thank you in advance.
 

Users who are viewing this thread

Top Bottom