Database window displays in accde

When I open my accde application, it briefly displays what looks like an access datatbase window or part thereof.

Is there anyway I can stop this?

Thanks in advance.
Clive BeatonAccess DeveloperAsked:
Who is Participating?
 
IrogSintaConnect With a Mentor Commented:
Ask the user to look away briefly.
 :-)
Sorry, but I don't have any more ideas.
0
 
Clive BeatonAccess DeveloperAuthor Commented:
More info:

I have a Welcome splash screen named in the Options > Current Database > Display Form.  Display Status Bar and Navigation Pane are also switched off.
0
 
IrogSintaCommented:
In your Welcome splash screen, add this:
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

Private Sub Form_Open(Cancel As Integer)
    Call ShowWindow(hWndAccessApp, SW_HIDE)
    DoCmd.OpenForm "NameOfMainForm", windowmode:=acDialog
End Sub

Open in new window

Then in your main form, you need to add this so that Access closes when the form is closed.  
Private Sub Form_Close()
    Application.Quit
End Sub

Open in new window

You can add a hidden button or label on one of your forms to bring back the Access window with this:
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

Private Sub btnShow_Click()
    Call ShowWindow(hWndAccessApp, SW_MAXIMIZED)
End Sub

Open in new window

0
Cloud Class® Course: Microsoft Office 2010

This course will introduce you to the interfaces and features of Microsoft Office 2010 Word, Excel, PowerPoint, Outlook, and Access. You will learn about the features that are shared between all products in the Office suite, as well as the new features that are product specific.

 
Clive BeatonAccess DeveloperAuthor Commented:
The following code displays the blank database screen, very briefly, and after a short period of time (probably the time specified in the On Timer event), displays the Login screen.  It doesn't doesn't display the splash (Welcome) screen, at all.

Option Compare Database
Option Explicit

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
Private Sub Form_Open(Cancel As Integer)
   Call ShowWindow(hWndAccessApp, SW_HIDE)
End Sub
Private Sub Form_Load()
   Me.TimerInterval = 2500
End Sub
Private Sub Form_Timer()
   Me.TimerInterval = 0
   DoCmd.Close
   DoCmd.OpenForm "frmLogin", windowmode:=acDialog
End Sub

It seems the call to hide the window, hides the Welcome screen.  What I really want to do is hide the Access screen.

Any ideas?

Thanks in advance.
0
 
IrogSintaCommented:
I see now.  Then you need to create a blank form that is opened first which will hide the Window and then open the Welcome screen.

 So remove the code I gave from the splash screen and in your new blank form, add this:
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

Private Sub Form_Open(Cancel As Integer)
    Call ShowWindow(hWndAccessApp, SW_HIDE)
    DoCmd.OpenForm "NameOfWelcomeScreen", windowmode:=acDialog
End Sub

Open in new window

Be sure to change Options > Current Database > Display Form accordingly.
0
 
Clive BeatonAccess DeveloperAuthor Commented:
I still get the blank database screen, briefly.
0
 
Clive BeatonAccess DeveloperAuthor Commented:
Thanks for the help, anyway.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.