Link to home
Start Free TrialLog in
Avatar of frankhampshire
frankhampshire

asked on

Visual Basic module reports cant find project or library for Trim on autoexec

Im using Access 2000 and trying to fix a problem in a function called during autoexec.

The function uses Trim and throws the error "cant find project or library". Which seems fairly silly. Is this a known problem? can anyone offer any suggestions.

This isnt my database so I dont have a complete history of its development. Trim and Left etc. all work once the database has started.
Avatar of frankhampshire
frankhampshire

ASKER

Update: None of the string functions such as Left, Right, Trim Ltrim Rtrim seem to be working. Strangely, Len is.
ASKER CERTIFIED SOLUTION
Avatar of mgrattan
mgrattan

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Also, if any of those functions are being used in a VBA routine, you can force them to work by explicitly calling them from the VBA object:

VBA.Left()
VBA.Right()

etc.
Just a small addition, access will add libraries when you add a new item from the toolbox. When you remove that item (often an .ocx), access leaves the library checked...
This will normally cause no problems, until you move the application to another computer or remove some "obsolete" .ocx files.

Personally I remove all checked libraries one by one and run a "compile all modules" after each uncheck to see or everything still works. If not, I just check that library again...

Nic;o)
mgrattan. Thanks Heaps. This was right on the money. Take these points, but dont spend 'em all in once place ;-)
Thanks, glad I could help.

ps:  I *wish* I could spend those points! ;-)