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  

Open a form in hidden view



 
 
Thread Tools Display Modes
  #1  
Old May 5th, 2008, 09:36 PM posted to microsoft.public.access.forms
Sam
external usenet poster
 
Posts: 855
Default Open a form in hidden view

I'm trying to have data export whenever the database closes. After looking
around on this site and others, it seems like the best way to do this is to
have a form open in the hidden mode when the Access database opens, and have
this "invisible" form trigger the export when it's closed, which is when the
database closes.

I can't get the form to open in hidden mode, however. I use this code to
call the function:

Private Sub Form_Open(Cancel As Integer)
Call Open_Form_Hidden
End Sub

The function called:

Public Sub Open_Form_Hidden()
DoCmd.OpenForm "Test", acNormal, , , , acHidden
End Sub

I've also tried changing the Visible property to false, but neither of these
do what I need. Does anyone have a suggestion for me?

Thanks,
Sam
  #2  
Old May 5th, 2008, 10:13 PM posted to microsoft.public.access.forms
Douglas J. Steele
external usenet poster
 
Posts: 9,313
Default Open a form in hidden view

AFAIK, you can't hide a form once you've opened it: you need to open it
hidden.

Either call Open_Form_Hidden from some other form, or use an AutoExec macro
to open it when the application first opens.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)


"Sam" wrote in message
...
I'm trying to have data export whenever the database closes. After
looking
around on this site and others, it seems like the best way to do this is
to
have a form open in the hidden mode when the Access database opens, and
have
this "invisible" form trigger the export when it's closed, which is when
the
database closes.

I can't get the form to open in hidden mode, however. I use this code to
call the function:

Private Sub Form_Open(Cancel As Integer)
Call Open_Form_Hidden
End Sub

The function called:

Public Sub Open_Form_Hidden()
DoCmd.OpenForm "Test", acNormal, , , , acHidden
End Sub

I've also tried changing the Visible property to false, but neither of
these
do what I need. Does anyone have a suggestion for me?

Thanks,
Sam



  #3  
Old May 5th, 2008, 11:14 PM posted to microsoft.public.access.forms
Sam
external usenet poster
 
Posts: 855
Default Open a form in hidden view

Thanks! Using the AutoExec macro works perfectly.

"Douglas J. Steele" wrote:

AFAIK, you can't hide a form once you've opened it: you need to open it
hidden.

Either call Open_Form_Hidden from some other form, or use an AutoExec macro
to open it when the application first opens.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)


"Sam" wrote in message
...
I'm trying to have data export whenever the database closes. After
looking
around on this site and others, it seems like the best way to do this is
to
have a form open in the hidden mode when the Access database opens, and
have
this "invisible" form trigger the export when it's closed, which is when
the
database closes.

I can't get the form to open in hidden mode, however. I use this code to
call the function:

Private Sub Form_Open(Cancel As Integer)
Call Open_Form_Hidden
End Sub

The function called:

Public Sub Open_Form_Hidden()
DoCmd.OpenForm "Test", acNormal, , , , acHidden
End Sub

I've also tried changing the Visible property to false, but neither of
these
do what I need. Does anyone have a suggestion for me?

Thanks,
Sam




 




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 09:29 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.