Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Database window displays in accde

Posted on 2012-09-07
7
Medium Priority
?
384 Views
Last Modified: 2012-12-15
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.
0
Comment
Question by:CRB1609
  • 4
  • 3
7 Comments
 

Author Comment

by:CRB1609
ID: 38378609
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
 
LVL 29

Expert Comment

by:IrogSinta
ID: 38380152
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
 

Author Comment

by:CRB1609
ID: 38380396
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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 29

Expert Comment

by:IrogSinta
ID: 38380401
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
 

Author Comment

by:CRB1609
ID: 38384726
I still get the blank database screen, briefly.
0
 
LVL 29

Accepted Solution

by:
IrogSinta earned 1500 total points
ID: 38384888
Ask the user to look away briefly.
 :-)
Sorry, but I don't have any more ideas.
0
 

Author Closing Comment

by:CRB1609
ID: 38695245
Thanks for the help, anyway.
0

Featured Post

Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Suggested Courses

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question