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 » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Hiding Access



 
 
Thread Tools Display Modes
  #1  
Old November 25th, 2004, 12:50 PM
Mark A. Sam
external usenet poster
 
Posts: n/a
Default Hiding Access

My client wanted a small form which displayed stats to reside on the top of
screen. It is probably a application better suited for VB or C++, but I
don't know them so I did it in Access. I am able to hide Access behind the
popup window, however resizing it will make it inconvenient when the user
opens Access for other applications. I found a function on the Access Web
which is exactly what I need (posted below) , but isn't working the way I
need. I don't know if it is the Access Version or other issue like the
operating system.

My client is using Access 2000 on Win 2000 server. When I execute the
function, Access disappears but also the popup window I want to display.
However, and Access button resided on the task bar.

On my machine at home I tested the function using Access 2002 on Win XP.
Access disappeared as well as the popup window, however the Access button
also disappeared from the task bar and did not show up in the task manager
under the Applications tab. It did show under the processed tab however and
I was able to shut it down.

I would appreciate any help either with the function or another method of
hiding Access, but allowing the Popup screen to appear.

God Bless,

Mark A.Sam
'************ Code Start **********
' This code was originally written by Dev Ashish.
' It is not to be altered or distributed,
' except as part of an application.
' You are free to use it in any application,
' provided the copyright notice is left unchanged.
'
' Code Courtesy of
' Dev Ashish
'
Global Const SW_HIDE = 0
Global Const SW_SHOWNORMAL = 1
Global Const SW_SHOWMINIMIZED = 2
Global Const SW_SHOWMAXIMIZED = 3


Private Declare Function apiShowWindow Lib "user32" _
Alias "ShowWindow" (ByVal hwnd As Long, _
ByVal nCmdShow As Long) As Long

Function fSetAccessWindow(nCmdShow As Long)
'Usage Examples
'Maximize window:
' ?fSetAccessWindow(SW_SHOWMAXIMIZED)
'Minimize window:
' ?fSetAccessWindow(SW_SHOWMINIMIZED)
'Hide window:
' ?fSetAccessWindow(SW_HIDE)
'Normal window:
' ?fSetAccessWindow(SW_SHOWNORMAL)
'
Dim loX As Long
Dim loForm As Form
On Error Resume Next
Set loForm = Screen.ActiveForm
If Err 0 Then 'no Activeform
If nCmdShow = SW_HIDE Then
MsgBox "Cannot hide Access unless " _
& "a form is on screen"
Else
loX = apiShowWindow(hWndAccessApp, nCmdShow)
Err.Clear
End If
Else
If nCmdShow = SW_SHOWMINIMIZED And loForm.Modal = True Then
MsgBox "Cannot minimize Access with " _
& (loForm.Caption + " ") _
& "form on screen"
ElseIf nCmdShow = SW_HIDE And loForm.PopUp True Then
MsgBox "Cannot hide Access with " _
& (loForm.Caption + " ") _
& "form on screen"
Else
loX = apiShowWindow(hWndAccessApp, nCmdShow)
End If
End If
fSetAccessWindow = (loX 0)
End Function

'************ Code End **********


  #2  
Old November 25th, 2004, 01:08 PM
Rick Brandt
external usenet poster
 
Posts: n/a
Default

"Mark A. Sam" wrote in message
...
My client wanted a small form which displayed stats to reside on the top of
screen. It is probably a application better suited for VB or C++, but I
don't know them so I did it in Access. I am able to hide Access behind the
popup window, however resizing it will make it inconvenient when the user
opens Access for other applications. I found a function on the Access Web
which is exactly what I need (posted below) , but isn't working the way I
need. I don't know if it is the Access Version or other issue like the
operating system.

My client is using Access 2000 on Win 2000 server. When I execute the
function, Access disappears but also the popup window I want to display.
However, and Access button resided on the task bar.


Does your form have the Popup property set to Yes. It needs to as that is the
only way that an Access form can exist "outside" the main Access window.


--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com


  #3  
Old November 25th, 2004, 02:20 PM
Mark A. Sam
external usenet poster
 
Posts: n/a
Default

Rick,

Yes, in fact I am able to hide the Access Window behind the form.

God Bless,

Mark
..

Does your form have the Popup property set to Yes. It needs to as that is

the
only way that an Access form can exist "outside" the main Access window.


--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com




  #4  
Old November 30th, 2004, 04:39 AM
Dirk Goldgar
external usenet poster
 
Posts: n/a
Default

"Rick Brandt" wrote in message

"Mark A. Sam" wrote in message
...
My client wanted a small form which displayed stats to reside on the
top of screen. It is probably a application better suited for VB or
C++, but I don't know them so I did it in Access. I am able to hide
Access behind the popup window, however resizing it will make it
inconvenient when the user opens Access for other applications. I
found a function on the Access Web which is exactly what I need
(posted below) , but isn't working the way I need. I don't know if
it is the Access Version or other issue like the operating system.

My client is using Access 2000 on Win 2000 server. When I execute
the function, Access disappears but also the popup window I want to
display. However, and Access button resided on the task bar.


Does your form have the Popup property set to Yes. It needs to as
that is the only way that an Access form can exist "outside" the main
Access window.


The form may need to have both its Popup and Modal properties set to
Yes.

--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)


  #5  
Old December 1st, 2004, 09:09 PM
Synergy Tooling Systems
external usenet poster
 
Posts: n/a
Default

Thanks Dick, that worked

The form may need to have both its Popup and Modal properties set to
Yes.

--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)




 




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

Similar Threads
Thread Thread Starter Forum Replies Last Post
WORD XP mail-merge FAILS using ACCESS query SueMackay Running & Setting Up Queries 4 November 29th, 2004 04:11 PM
transpose john Using Forms 1 November 24th, 2004 06:16 PM
How do you turn back on Access tool bar after hiding with the shi. Hank General Discussion 1 November 24th, 2004 01:38 AM
Useless Access 2003 tired, angry, sucidial and bored General Discussion 10 July 21st, 2004 11:52 PM
Need help with Access decision aualias General Discussion 23 June 21st, 2004 02:04 AM


All times are GMT +1. The time now is 05:17 AM.


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