Trim Function

  • Thread starter Thread starter jack
  • Start date Start date
J

jack

I have posted this before but cannot locate on the
newsletter listing - if you had previously responded I
appreciate another reply.

I have two a2000 dbases. One is an old copy of the
other. The original uses the "Trim" function
successfully, the other must have the library file to work
(i.e. "VBA.Trim"), else causes a compile error.

I have checked the references, the object browser can
locate, I have used the office repair function, all seems
ok.

What is going on here?

Regards

Jack
 
Off the top of my head, that looks like a custom trim
function, either from a custom library or MDB file named
VBA...does the function work any differently the the
standard Trim()?

Jake
 
-----Original Message-----
Off the top of my head, that looks like a custom trim
function, either from a custom library or MDB file named
VBA...does the function work any differently the the
standard Trim()?

Jake

.
 
Here's a copy of the answer given previously:

Unless the database has a library marked "MISSING", it appears to believe
there is something else named "Trim". It could be an object, module, public
variable or even the project itself.

If you can't find any such object after a good search, you may be able to
straighten it out by declaring a public function named Trim in a new module.
Compile, and save. Delete the module. Compact the database. Compile again.
If you're in luck, Acces/VBA will have reassigned its Trim() to the new
function, and then freed it up when you deleted the module.
 
Check the reference list to see if ANY library reference
is marked as "MISSING". This will cause a compilation
error as the VBA interpreter tries to resolve references
when actioning lines of code.

This could happen because you have changed a version of a
program. For instance, if you have included a reference
to an older version of Outlook and not corrected it in
the upgraded program, or if you move the database to a
different PC where a program is not installed.
 
Back
Top