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.
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
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
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
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.