Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Remove the Access program window when database is opened default

Posted on 2008-11-01
5
Medium Priority
?
292 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 2000 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

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

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

Code that checks the QuickBooks schema table for non-updateable fields and then disables those controls on a form so users don't try to update them.
Instead of error trapping or hard-coding for non-updateable fields when using QODBC, let VBA automatically disable them when forms open. This way, users can view but not change the data. Part 1 explained how to use schema tables to do this. Part 2 h…
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: …
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

722 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