Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 318
  • Last Modified:

Remove the Access program window when database is opened default

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
Pivnardo
Asked:
Pivnardo
1 Solution
 
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)Commented:
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
 
tbsgadiCommented:
Hi Pivnardo,

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

Good Luck!

Gary
0
 
peter57rCommented:
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
 
PivnardoAuthor Commented:
Sorry for the slow responce.  Great information and really do appericate the responce even if all the information was not yours.  :)
0
 
PivnardoAuthor Commented:
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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now