Database Window not closing with startup menu!!! (1 Viewer)

fxp

Registered User.
Local time
Yesterday, 21:29
Joined
Mar 3, 2006
Messages
13
MS Access 2000

Hello everybody,

I am having a strange problem and despite trying out all the suggestions already discussed in this forum, the problem still persists.

My DB is already complete and I have done the following
1) Startup menu/uncheck all the option boxes
2) Tools menu/options/unchecked "windows in taskbar"
3) converted the DB into mde. file
4) Disabled the shift key
However, despite doing all the above, the "Database windows" shows up behind all the forms.

As per suggestions given by many here, I have also used

DoCmd.RunCommand acCmdWindowHide

This also does not work.

Also tried running the following in a macro from this link
http://www.mvps.org/access/api/api0019.htm

All the above have not worked and if anyone has any ideas or another way of doing this, I would really appreciate it.
 
Last edited:

jrjr

A work in progress
Local time
Today, 00:29
Joined
Jul 23, 2004
Messages
291
Delete your duplicate posts!!

Did you see this post?
http://www.access-programmers.co.uk/forums/showthread.php?t=97578

What I use:
make a new function:

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


________________
In the onload event of your main menu or whatever form you load at start up
put this:
Call fSetAccessWindow(0)

All of your forms will need to be set to modal -yes and pop up- yes
 
Last edited:

fxp

Registered User.
Local time
Yesterday, 21:29
Joined
Mar 3, 2006
Messages
13
jrjr said:
Delete your duplicate posts!!

Did you see this post?
http://www.access-programmers.co.uk/forums/showthread.php?t=97578

What I use:
make a new function:

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


________________
In the onload event of your main menu or whatever form you load at start up
put this:
Call fSetAccessWindow(0)

All of your forms will need to be set to modal -yes and pop up- yes

Hello JRJR,

Thank you for your reply. I have followed your instructions exactly. However, now my login form (first form) is not loading anymore. Just anothe newbie question.... should i try to do the above as a module?
Everything appears as a complete blank.
Is there something I m not doing that may cause the form not to load?

I would appreciate it if anyone has a sample database which shows what you have mentioned above.

Regards
 

jrjr

A work in progress
Local time
Today, 00:29
Joined
Jul 23, 2004
Messages
291
The last line of instructions:

All of your forms will need to be set to modal- yes and pop up- yes
 

Users who are viewing this thread

Top Bottom