Hiding access

  • Thread starter Thread starter d31b0y
  • Start date Start date
D

d31b0y

Guest
I'm trying to hide access(i.e. toolbars etc.), and only view a form. Is this possible?
 
Tools, Startup, in Startup form study, "Display Form/Page", "Display Database Window", and s.o.
 
What I have done for similar situations is to create a new menu(Toolbar), then have it selected and uncheck all other default menus in View-Toolbars-Customize.

You can then drag your forms,reports etc. to your new menu.

Hope this helps.
 
Hidden Access Program Window

I found some really cool code a while back that will completely hide the program window. Email me if you want me to send you my database so you can see the code in action (Ialso created a pretty cool logon form). Again, this is not my coding, but it works really well! Make sure you have a form specified in the startup options or nothing will appear at all :eek: , and if you get into trouble, hold down the shift key while opening the DB and the access window will show up.

Ok, first you have to paste the following code into a module called "SetAccessWindow"
Code:
Option Compare Database
Option Explicit

Global Const SW_HIDE = 0
Global Const SW_SHOWNORMAL = 1
Global Const SW_SHOWMINIMIZED = 2
Global Const SW_SHOWMAXIMIZED = 3

Private Declare Function apiShowWindow Lib "user32" _
Alias "ShowWindow" (ByVal hWnd As Long, _
ByVal nCmdShow As Long) As Long

Function fSetAccessWindow(nCmdShow As Long)

Dim loX As Long
Dim loform As Form
On Error Resume Next
Set loform = Screen.ActiveForm

If Err <> 0 Then
loX = apiShowWindow(hWndAccessApp, nCmdShow)
Err.Clear
End If

If nCmdShow = SW_SHOWMINIMIZED And loform.Modal = True Then
MsgBox "Cannot minimize Access with " _
& (loform.Caption + " ") _
& "form on screen"
ElseIf nCmdShow = SW_HIDE And loform.PopUp <> True Then
MsgBox "Cannot hide Access with " _
& (loform.Caption + " ") _
& "form on screen"
Else
loX = apiShowWindow(hWndAccessApp, nCmdShow)
End If
fSetAccessWindow = (loX <> 0)
End Function

Then you have to paste this code into every form
Code:
Private Sub Form_Load()
Call fSetAccessWindow(0)
End Sub

Good luck!



"The two most common elements in the universe are Hydrogen and stupidity."
- Harlan Ellison
 
Hello,

I love hiding the Access windows but had a question of possiblity. Of course the issue is the reports dont work because they are not allowed to pop up.

I have reports that only really need to be viewed monthly. Is there a way to have this code check the date of now() and turn of each month from say the 5th - 10th of each month?

Didnt know if that was far fetched or not?

Any opinions?
 

Users who are viewing this thread

Back
Top Bottom