Undeletable Form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have acquired a temporary form, by a wholly unknown means, which resists
all attempts at deletion. It is called ~TMPCLP262681 and is a copy of
another form in my database. If I display the VBA code, this form appears at
the head of the list of forms in the window on the left of the screen.
Nothing happens if I click delete and if I display its properties, I note
that the 'Remove ~TMPCLP262681' option is disabled, as indeed is this option
for all other forms. I have tried the VBA delete command in the immediate
window only to be told that 'Access cannot find the form ~TMPCLP262681'.

Windows Explorer cannot see it either, so I can't delete it using that
utility. Neither does it appear in the list of forms in the database window.

The only way I can think of getting rid of the thing is to copy the whole
database to a new one, item by item, so leaving it stranded but that seems a
bit of a sledgehammer to crack a nut and I am not even sure if it would work.
There must surely be an easier way?
 
No, you've found the best way. Create a new, blank database file and go to
File|Get External Data|Import. You will be able to select all objects and
import them at one time. Just remember to not select that one. There are a
couple of options you can choose if you click on the Options button. You
will want to import the tables Structure and Data, Queries as queries, and
probably the Relationships and any custom menus, toolbars, and import/export
specs that you have made.
 
Hi, Peter.
I have acquired a temporary form, by a wholly unknown means, which resists
all attempts at deletion.

It's an object already marked for deletion by Jet. Besides, one cannot
delete class objects from the Project Explorer window. Objects can be
deleted from the Database Window, instead. Have you compacted the database
since this object name showed up? Jet gets rid of objects marked for
deletion during compaction, because they are still in the file until then
taking up space, which is why occasional compaction is a recommended practice.

If you've already compacted and this object didn't go away, then create a
new database file and import all objects except this one from this database
into the new one from the Import dialog window.

HTH.

Gunny

See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips.

(Please remove ZERO_SPAM from my reply E-mail address, so that a message
will be forwarded to me.)
Beware to those who use munged addresses: known newsgroup E-mail harvesters
for spammers are (e-mail address removed) and (e-mail address removed)

- - -
When you see correct answers to your question posted in Microsoft's Online
Community, please sign in to the Community and mark these posts as "Answers,"
so that all may benefit by filtering on "Answered questions" and quickly
finding the right answers to similar questions. Remember that the first and
best answers are often given to those who have a history of rewarding the
contributors who have taken the time to answer questions correctly.
 
Peter -
It sounds to me like a bug in Access. I'm guessing it probably showed up
when you created a form at some point and it possibly froze up or tried to
auto-save the form and didn't finish it. Maybe your computer locked up at
some point with Access open?

It's difficult to say with certainty, but I'd guess that the form doesn't
really exist. You're probably seeing an old reference to a form which no
longer exists under that name. I'd make sure you have all available
office/Access updates installed. Then maybe run the 'compact and repair
database' command from the tools menu.
Does the form cause any problems, or is it just the fact that it's there
that you don't like? I'd say if it's not causing any issues, just ignore it,
or give your idea a try. Copying all of the items to a new database should
fix it. I have done that once or twice to get past some corruption, and it
seemed to fix it for me.
Not much help, but good luck...
 
This response is really directed to all who have contributed to this thread
but you refer specifically to compaction and I may be able to contribute
something useful in that area.

When starting to use Access in earnest, I soon became aware of its tendency
to 'bloat'. Adding a few forms or making one or two changes could pile on
megabytes. An even less welcome discovery was that compaction did not remove
all this bloat. Eventually I finished up with a database which was nearly
twice the size it should have been and I could not get rid of the excess.
Finally it led to serious malfunction. I was in deep trouble and unable to
get out of it. Compaction did nothing.

By persevering, I finally managed to get the assistance of a Microsoft guru
(as opposed to front line support where the guy usually opens up by asking
whether you have put the plug in the wall socket and switched on - or the
programming equivalent thereof.) This expert made me aware of an
undocumented MS feature which he felt might deal with my by then
well-corrupted database but he warned that it was undocumented because one of
its side effects was its ability to destroy corrupted databases as an
alternative to repairing them.

The technique is to open the database using the /Decompile switch and then
to recompile the result. On my first attempt, my corrupted database shed
1.5Mb and then ran like a dream.

The reconmmendation was that, once used, the utility should be deleted, to
avoid inadvertent use. If it can be lethal in some circumstances, I must say
that I have never found it anything but brilliant. I have therefore set up a
shortcut to the command line decompile and named it the 'Carwash'. As I
develop so I put each amended version through the Carwash and every time it
sheds pounds. I have located the shortcut in my Unused Desktop Icons folder,
where I think it is reasonably safe. By clicking Properties I can easily
amend the command line to accept the current version of each database, as I
wish to clean it up. This avoids having to reinput the whole command line,
which can be lengthy and the process therefore prone to error.

Since starting to use the Carwash, bloat has become a thing of the past and
malfunction due to corruption is now virtually unknown. However, I pass this
on 'As Is'. Don't blame me if you try it and destroy your database. The man
from Microsoft indicated that it was a distinct possibility but I must
reiterate that I have never had a moment's bother. Mind you, by using it
regularly, I probably avoid ever presenting it with a seriously corrupted
database.

One last word on compaction. I have selected the option for automatic
compaction every time I close my database. This is useful but the Carwash
always shrinks the result further, sometimes substantially. Experience
suggests that what it sheds is unwanted junk.
 
You are correct that the /Decompile switch helps in many cases. There are
also other ways to force a decompile. You will find though, that with the
2002/2003 file format, that a /Decompile and Compact won't do as good a job
as it did in earlier versions. With the 2002/2003 file format you will have
better luck transferring everything to a new file.

http://support.microsoft.com/default.aspx?scid=kb;en-us;810415
 
Back
Top