Re: Strange Problems with VBA
From: Jim Vierra (jvierra_at_msn.com)
Date: 01/26/05
- Next message: Jim Vierra: "Re: VBA Problems"
- Previous message: Jim Vierra: "Re: VB .net - A question for Microsoft Moderators..."
- In reply to: David C. Holley: "Re: Strange Problems with VBA"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 26 Jan 2005 14:32:20 -0500
If you open a form (run a form) it will be saved in memory unless you
destroy it. This causes a conflict when you try to rename a form to the
name of a previously deleted but once activiated form. Find the form in the
"Forms" collection or run the test form and save a reference to the object
globaly or in a global collection. Then after closing the form and deleting
it you can find the reference and destroy the form and set it's reference to
Nothing.
You must be sure that no other form has been run that contains a reference
to the form you are trying to replace.
-- Jim Vierra 661815 "David C. Holley" <DavidCHolley@netscape.net> wrote in message news:eq8uba6AFHA.3592@TK2MSFTNGP11.phx.gbl... > Additional information... > The modules containing the FORM-related code are not being deleted when I > delete the forms from the DB. This occurred in a freshly created *.mdb > file. > > David H > > David C. Holley wrote: >> Something weird is going on. I was in the process of debuging a form >> (frmReservations) in Access. As a part of this, I created a copy of the >> form (frmReservations_backup). Once I had figured out the problem with >> the original. I deleted it and then went to rename the _backup to the >> original. At first, Access really didn't like that indicating that a form >> by that name already existed, although I had deleted it and it didn't >> appear in the DB window. Then when I tried to view the VBA code for the >> backup, Access started through an error message - "Error accessing code. >> The connection to the network might have been lost." >> >> I did a compact and repair on the db file, which didn't work. I then >> imported the form into a fresh db file, which seemed to fix the problem, >> but then when I started working with a function in a module that I >> exported and imported, Access would throw the error message at me when I >> tried to ADD parameters to a sub. >> >> I've already done a uninstall/reinstall of ALL of Office on the chance >> that this would fix it, but it didn't. >> >> I think that the problem possibly has something to do with specific DB >> files as opposed to Access and may just flat out import/export everything >> (ARGGGG!!!) but its just plain strange. >> >> Any ideas? >> >> FYI: Office 2000 Pro on WinXP >> >> David H >> Come on baby lite my fire: www.spreadFirefox.com
- Next message: Jim Vierra: "Re: VBA Problems"
- Previous message: Jim Vierra: "Re: VB .net - A question for Microsoft Moderators..."
- In reply to: David C. Holley: "Re: Strange Problems with VBA"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|