How to get rid of control in form

  • Thread starter Thread starter Salvador Dali
  • Start date Start date
S

Salvador Dali

Hello,

I had developed an access xp database a while ago and at some point during
development, I had inserted an ms datagrid control (or something similar) in
one of my forms. At some later point, I removed the control because I found
out that in the end I didn't need it.
The problem is, the new database still asks for the dll (or ocx, don't remember)
of the control, even though I am not using it anymore!
Any ideas?
 
If you have not already done so, check your VBA code to see if there are any
Declarations, Procedures or Functions that may have been inserted into the
code for the datagrid.

After that, try a compact and repair of the db. I did have one instance
where XP refused to "forget about" a deleted control. It was necessary to
create a new database and import all of the objects from the old. That
cured the problem.

hth,
 
I have no code that refers to the control. I think this is a bug in Access.
It is too much of a hassle for me to create a new db and import all objects,
forms, reports, and code from the old one.
 
You could try decompiling your database. I got this from
one of the previous posts. Read carefully.

"I suspect that it wasn't so much the content of the edit,
but rather that fact
that you performed an edit that made the difference. You
might have some VBA
corruption that just happened to "unscramble" itself enough
after your edit to
clear up the problem. If you experience problems again, you
might consider
"decompiling" the application file in an attempt to remove
any such corruption.
There is an *unsupported* "decompile" switch (available in
Access 97, 2000, 2002
and, presumably, 2003) that can be used to help correct
this situation, but this
is more of a "last resort" in that there is some risk to
the file as described
in http://www.trigeminal.com/usenet/usenet004.asp?1033 (so
.... work with a copy
of the file). Further information is available at
http://www.databasecreations.com/DatabasePerformanceTips.pdf
and
http://www.granite.ab.ca/access/decompile.htm. The
procedure I use when
implementing this is as follows:

start/run
msaccess /decompile c:\mrsr.mdb

1) BACK UP YOUR MDB FILE!
1) BACK UP YOUR MDB FILE! (I meant it the first time <g>)
2) Compact the MDB.
3) Implement the "/decompile" as described in the articles
I referenced.
(Access 2000, and later, don't provide the confirmation
dialog that
existed in Access 97, but the decompile will still take
place.)
4) Open Access normally and compact the MDB again to clean up.
5) Compile and save.
6) Compact again before testing/using."

Jim
 
You might also check to see what "References" are selected
in your VB code. Easiest way to do this is to open a
module, any module. Then from the menu bar select "tools"
and then "References". You will probably see that a
reference is set tothe the .dll giving you problems. Just
uncheck it, press the OK button and you should be ok
 
Back
Top