Re: DoCmd.Close and DoCmd.DeleteObject
From: Daniel Magnus Bennét Björck (Daniel.Bjorck_at_dk.dhl.com)
Date: 05/21/04
- Next message: anonymous_at_discussions.microsoft.com: "Re: Speed"
- Previous message: James: "Re: Speed"
- In reply to: TC: "Re: DoCmd.Close and DoCmd.DeleteObject"
- Next in thread: MacDermott: "Re: DoCmd.Close and DoCmd.DeleteObject"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 21 May 2004 11:02:44 +0200
Hi!
Recreating the database does not make a difference unfortunately. It is
still consistently not deleting forms that were previously opened, but has
no problems with the ones that weren't open. Could it be that as the form to
be deleted was open when the second form was opened, the second form still
somehow thinks it's open even though it has closed it? Perhaps there is some
system command to run after DoCmd.Close to ensure that the second form sees
that the first form really was closed?
I put in a snippet in the timer event to record when it was firing, and it
is not firing after the form has been closed. And interestingly, if I choose
End from the debug mode, I have no problems deleting the form manually!
Brgds
Danny
"TC" <no@email.here> wrote in message
news:40ac07b5$1_4@news.chariot.net.au...
> If you're positive that the form in question is closed, and not running a
> timer event, and you still can't delete it, the only other thing that I
can
> think of, is that the database is corrupt. Try importing all the objects
> into a new db, & see if that fixes it.
>
> You said originally: "As long as the form hasn't been previously opened,
it
> [the delete] works fine". Is that still true (after importing into a new
> db)?
>
> HTH,
> TC
>
>
> "Daniel Magnus Bennét Björck" <Daniel.Bjorck@dk.dhl.com> wrote in message
> news:ujHQ9YXPEHA.2704@TK2MSFTNGP10.phx.gbl...
> > Hi!
> >
> > Yes, it is trying to delete other forms, not itself.
Compacting/repairing
> > does not help.
> >
> > Brgds
> >
> > Danny
> >
> > "TC" <no@email.here> wrote in message
> > news:40aae0ec$1_2@news.chariot.net.au...
> > > You're sure that the upgrade form is not accidentally trying to delete
> > > itself? (hence the message)
> > >
> > > If not, perhaps compact the database & try again.
> > >
> > > HTH,
> > > TC
> > >
> > >
> > > "Daniel Magnus Bennét Björck" <Daniel.Bjorck@dk.dhl.com> wrote in
> message
> > > news:uJfKLgKPEHA.308@TK2MSFTNGP11.phx.gbl...
> > > > Hi!
> > > >
> > > > I have an upgrade form which replaces forms in the current database
> with
> > > new
> > > > versions from another database. However, when I try to delete an old
> > form
> > > > using DoCmd.DeleteObject, I get an error message saying that the
form
> is
> > > > still open; even though I've used DoCmd.Close on it, and it does
> indeed
> > > fire
> > > > and complete the Close event on that form, and it doesn't show on
the
> > > screen
> > > > anymore, and an IsFormLoaded function I've picked up somewhere does
> also
> > > say
> > > > that it is indeed closed.
> > > >
> > > > As long as the form hasn't been previously opened, it works fine. Is
> > there
> > > > something I'm missing about closing forms? For instance, two forms
I'm
> > > > particularly having problems with are using Timer events, could it
be
> > that
> > > > they are still running in some form even though the form is closed??
> Or
> > > > could there be some problem with DeleteObject, in which case, is
there
> > > > another way of deleting forms I could try??
> > > >
> > > > Brgds
> > > >
> > > > Danny
> > > >
> > > >
> > >
> > >
> >
> >
>
>
- Next message: anonymous_at_discussions.microsoft.com: "Re: Speed"
- Previous message: James: "Re: Speed"
- In reply to: TC: "Re: DoCmd.Close and DoCmd.DeleteObject"
- Next in thread: MacDermott: "Re: DoCmd.Close and DoCmd.DeleteObject"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|