PC Review


Reply
Thread Tools Rate Thread

Access 2003 Hide Form to trigger a DB On Close event

 
 
=?Utf-8?B?UGF0by1jaGFu?=
Guest
Posts: n/a
 
      4th Apr 2006
In previous versions of Access one was able to trigger a database OnClose
Event by having a form hidden in the background and coding the OnClose event
of the form to function like the OnClose Event of the database.

The problem is that Access 03 doesn't seem to let one do this anymore. I
can't get my form to be completely hidden. And when I close the DB it takes
precedence over the form closing so my code doesn't execute.

Anyone have ideas on how to create a pseudo OnClose event for a database in
03?
 
Reply With Quote
 
 
 
 
Rick Brandt
Guest
Posts: n/a
 
      4th Apr 2006
Pato-chan wrote:
> In previous versions of Access one was able to trigger a database
> OnClose Event by having a form hidden in the background and coding
> the OnClose event of the form to function like the OnClose Event of
> the database.
>
> The problem is that Access 03 doesn't seem to let one do this
> anymore. I can't get my form to be completely hidden. And when I
> close the DB it takes precedence over the form closing so my code
> doesn't execute.
>
> Anyone have ideas on how to create a pseudo OnClose event for a
> database in 03?


You have something else going on because this behavior has not changed in
Access 2003. The Close and Unload events of all (open) reports and forms
should fire when Access is closed.

How are you hiding your form? What do you mean when you say it is "not
completely hidden"?


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


 
Reply With Quote
 
=?Utf-8?B?UGF0by1jaGFu?=
Guest
Posts: n/a
 
      5th Apr 2006


"Rick Brandt" wrote:

> Pato-chan wrote:
> > In previous versions of Access one was able to trigger a database
> > OnClose Event by having a form hidden in the background and coding
> > the OnClose event of the form to function like the OnClose Event of
> > the database.
> >
> > The problem is that Access 03 doesn't seem to let one do this
> > anymore. I can't get my form to be completely hidden. And when I
> > close the DB it takes precedence over the form closing so my code
> > doesn't execute.
> >
> > Anyone have ideas on how to create a pseudo OnClose event for a
> > database in 03?

>
> You have something else going on because this behavior has not changed in
> Access 2003. The Close and Unload events of all (open) reports and forms
> should fire when Access is closed.
>
> How are you hiding your form? What do you mean when you say it is "not
> completely hidden"?
>
>

I figured out why my form was only partially hidden. I'm now using
DoCmd.OpenForm "InvisibleForm", , , , , acHidden to open the form as hidden.
But I still can't keep Access from closing on top of my PeopleInput form.
The code below executes but Access still closes. Am I doing something wrong?

Private Sub Form_Close()
' Open the form to get the # people worked
DoCmd.OpenForm "PeopleInput"
End Sub
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Closing Access While Form Is In Print Preview Does Not Trigger Form Unload Event Stewart Berman Microsoft Access Form Coding 3 7th Jun 2010 03:15 AM
hide the close button in Access 2003 =?Utf-8?B?YmFydHk=?= Microsoft Access 3 1st Feb 2007 06:31 PM
where to put DoCmd.Close to trigger event properly =?Utf-8?B?amFuYWtp?= Microsoft Access Form Coding 3 16th Feb 2006 07:26 PM
Access Form Menu Bar - Hide The Close Button ('X') Ryan Microsoft Access Forms 0 28th Jul 2004 12:36 AM
Hide / Close Access Toolbars / Menu in Opening Form Mike Thomas Microsoft Access Form Coding 4 6th Apr 2004 10:09 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:39 PM.