Hey
Im trying to find a way to hide the access window when a user opens the database.
I want the user only to see the pop-up form that is displayed on opening the file.
I have tried two ways
This:
and then a function like this
both do work as they intended to do.
but it is not good enough for me.
both are still showing the access window when alt tabbing around when working with the access file.
it works if the user only works in the access file, but if alt tabbing somewhere and then back, the access window is back in the background.
however i am thinking of a solution.
instead of any of those codes above.
is there a some way i can force the main access window to get a preset size?
i want to make it small so it is not noticed and more or less hide behind the forms that the user are working on.
this would solve everything for me i think.
anyone able to help me with this?
Im trying to find a way to hide the access window when a user opens the database.
I want the user only to see the pop-up form that is displayed on opening the file.
I have tried two ways
This:
Code:
DoCmd.ShowToolbar "Ribbon", acToolbarNo
and then a function like this
Code:
Option Compare Database
Option Explicit
'''HIDE WINDOW MODULE
'''USE THIS TO ACTIVATE HIDE WINDOW MODULE
''' SixHatHideWindow(SW_SHOWMINIMIZED)
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 SixHatHideWindow(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
SixHatHideWindow = (loX <> 0)
End Function
both do work as they intended to do.
but it is not good enough for me.
both are still showing the access window when alt tabbing around when working with the access file.
it works if the user only works in the access file, but if alt tabbing somewhere and then back, the access window is back in the background.
however i am thinking of a solution.
instead of any of those codes above.
is there a some way i can force the main access window to get a preset size?
i want to make it small so it is not noticed and more or less hide behind the forms that the user are working on.
this would solve everything for me i think.
anyone able to help me with this?