A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Minimise Access Window



 
 
Thread Tools Display Modes
  #1  
Old August 27th, 2009, 09:13 AM posted to microsoft.public.access
Duncs
external usenet poster
 
Posts: 148
Default Minimise Access Window

Aaaagggghhhhh!

I can get this to work at all. I have a form that loads automatically
when my database is opened. What I want to do is, when the form is
loaded / opened, I want the main access window to minimise, so that
the only thing on screen is my form from the database.

I have tried to use both DoCmd.RunCommand acCmdAppMinimize &
DoCmd.RunCommand acCmdWindowHide, neither of which seem to work.

Can anyone help?

TIA

Duncs

  #2  
Old August 27th, 2009, 09:40 AM posted to microsoft.public.access
Tom Wickerath
external usenet poster
 
Posts: 3,914
Default Minimise Access Window

Hi Duncs,

You didn't say which version of Access you are using, but the following
Form_Open event procedure works fine in Access 2000/2002/2003 to minimize,
but not hide, the database window. I do not know if this code will work with
the Navigation Pane in Access 2007 (I kind of doubt that it will):

Option Compare Database
Option Explicit

Private Sub Form_Open(Cancel As Integer)
On Error GoTo ProcError

'This code makes sure the Database Window gets minimized

Dim strDocName As String

strDocName = "tblGuests" '---Must use a valid object name here

' Give focus to Database window; select Guest table
DoCmd.SelectObject acTable, strDocName, True
DoCmd.Minimize

ExitProc:
Exit Sub
ProcError:
MsgBox "Error " & Err.Number & ": " & Err.Description, _
vbCritical, "Error in procedure Form_Open..."
Resume ExitProc
End Sub


If you want to completly hide the database window in Access 2000/2002/2003,
then simply select Tools | Startup and uncheck the "Show Database Window"
option. As long as you leave the Special Keys option enabled, you can use the
F11 key to re-display the database window.


Tom Wickerath
Microsoft Access MVP
http://www.accessmvp.com/TWickerath/
__________________________________________

"Duncs" wrote:

Aaaagggghhhhh!

I can get this to work at all. I have a form that loads automatically
when my database is opened. What I want to do is, when the form is
loaded / opened, I want the main access window to minimise, so that
the only thing on screen is my form from the database.

I have tried to use both DoCmd.RunCommand acCmdAppMinimize &
DoCmd.RunCommand acCmdWindowHide, neither of which seem to work.

Can anyone help?

TIA

Duncs

  #3  
Old August 27th, 2009, 10:26 AM posted to microsoft.public.access
Duncs
external usenet poster
 
Posts: 148
Default Minimise Access Window

Tom,

I'm using 2003 and your suggestion of the Tools | Startup option seems
the best way forward.

Many thanks for this.

Duncs

On 27 Aug, 09:40, Tom Wickerath AOS168b AT comcast DOT net wrote:
Hi Duncs,

You didn't say which version of Access you are using, but the following
Form_Open event procedure works fine in Access 2000/2002/2003 to minimize,
but not hide, the database window. I do not know if this code will work with
the Navigation Pane in Access 2007 (I kind of doubt that it will):

Option Compare Database
Option Explicit

Private Sub Form_Open(Cancel As Integer)
On Error GoTo ProcError

'This code makes sure the Database Window gets minimized

Dim strDocName As String

* * strDocName = "tblGuests" * '---Must use a valid object name here

' Give focus to Database window; select Guest table
* * DoCmd.SelectObject acTable, strDocName, True
* * DoCmd.Minimize

ExitProc:
* * Exit Sub
ProcError:
* * MsgBox "Error " & Err.Number & ": " & Err.Description, _
* * * * * vbCritical, "Error in procedure Form_Open..."
* * Resume ExitProc
End Sub

If you want to completly hide the database window in Access 2000/2002/2003,
then simply select Tools | Startup and uncheck the "Show Database Window"
option. As long as you leave the Special Keys option enabled, you can use the
F11 key to re-display the database window.

Tom Wickerath
Microsoft Access MVPhttp://www.accessmvp.com/TWickerath/
__________________________________________



"Duncs" wrote:
Aaaagggghhhhh!


I can get this to work at all. *I have a form that loads automatically
when my database is opened. *What I want to do is, when the form is
loaded / opened, I want the main access window to minimise, so that
the only thing on screen is my form from the database.


I have tried to use both DoCmd.RunCommand acCmdAppMinimize &
DoCmd.RunCommand acCmdWindowHide, neither of which seem to work.


Can anyone help?


TIA


Duncs- Hide quoted text -


- Show quoted text -


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 07:57 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.