Solved

Remove the Access program window when database is opened default

Posted on 2008-11-01
5
274 Views
Last Modified: 2013-11-27
I would like to know how to remove the Acess program window the default form that is loaded.

I have found ways of removing the tool bars and such to have  a nice window to run in.  However, the outside window border of Access is in the way.

It would be great to even have Access open minized and the form loaded on the screen.
0
Comment
Question by:Pivnardo
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 75
ID: 22860473
Don't think you can do that, but ... if there is a way ... most likely you will find it here:

http://www.mvps.org/access/search.htm

mx
0
 
LVL 46

Expert Comment

by:tbsgadi
ID: 22860528
Hi Pivnardo,

Have a look at Window Manipulation Examples
http://www.peterssoftware.com/winmanip.htm

Good Luck!

Gary
0
 
LVL 77

Accepted Solution

by:
peter57r earned 500 total points
ID: 22860676
These are instructions I've picked up from another support site.
I would attribute them properly but the author didn't give his name.
The crucial elements are that all forms must be popups and you can't hide the Access window for reports.


1.  Copy the code at the bottom into a module.  
2.  Create a macro and call it mcrHide.  
  The Macro has one Action line - RunCode - and put the following in the Function box:
      fAccessWindow ("Minimize", False, False)    (Yes, this really is Minimize not Hide)

3.  Create another macro and call it mcrRestore.  
 The Macro has one Action line - RunCode - and put the following in the Function box:
      fAccessWindow ("Show", False, False)

4.  You have set every form in your database to PopUp....find the PopUp property for each form and set it to yes.  In the OnOpen event procedure of your startup form (if you don't have a startup form, just pick the first form you open when you open the database), put the following code:

      DoCmd.RunMacro "mcrHide"     (alternatively just select the macro name in the property box)

5.  Finally, to allow reports to be previewed you will need to create a 'restore' macro similar to the others,  and in every report you use:

      In the OnOpen:      DoCmd.RunMacro "mcrRestore"
      In the OnClose:     DoCmd.RunMacro "mcrHide"

(In other words , you MUST show the Access window for reports)



Private Declare Function IsWindowVisible Lib "user32" (ByVal hwnd As Long) As Long
Dim dwReturn As Long

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

Private Declare Function ShowWindow Lib "user32" (ByVal hwnd As Long, _
     ByVal nCmdShow As Long) As Long
     
Public Function fAccessWindow(Optional Procedure As String, Optional SwitchStatus As Boolean, Optional StatusCheck As Boolean) As Boolean
If Procedure = "Hide" Then
    dwReturn = ShowWindow(Application.hWndAccessApp, SW_HIDE)
End If
If Procedure = "Show" Then
    dwReturn = ShowWindow(Application.hWndAccessApp, SW_SHOWMAXIMIZED)
End If
If Procedure = "Minimize" Then
    dwReturn = ShowWindow(Application.hWndAccessApp, SW_SHOWMINIMIZED)
End If
If SwitchStatus = True Then
    If IsWindowVisible(hWndAccessApp) = 1 Then
        dwReturn = ShowWindow(Application.hWndAccessApp, SW_HIDE)
    Else
        dwReturn = ShowWindow(Application.hWndAccessApp, SW_SHOWMAXIMIZED)
    End If
End If
If StatusCheck = True Then
    If IsWindowVisible(hWndAccessApp) = 0 Then
        fAccessWindow = False
    End If
    If IsWindowVisible(hWndAccessApp) = 1 Then
        fAccessWindow = True
    End If
End If
End Function
0
 

Author Closing Comment

by:Pivnardo
ID: 31512446
Sorry for the slow responce.  Great information and really do appericate the responce even if all the information was not yours.  :)
0
 

Author Comment

by:Pivnardo
ID: 23023816
I can't believe Microsoft has made the ability to minimize the window arround the application so difficult.  I am surprised there is not a big "Microsoft" watermark across the entire page.  Like it isn't enough having to refinance you home to buy Office 2007.
The solution is much appericated and I extend my middle finger slowly to Microsoft on this one !
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
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: …

617 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