Solved

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

Posted on 2001-07-31
6
364 Views
Last Modified: 2008-03-17
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.
0
Comment
Question by:frankhampshire
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 

Author Comment

by:frankhampshire
ID: 6338848
Update: None of the string functions such as Left, Right, Trim Ltrim Rtrim seem to be working. Strangely, Len is.
0
 
LVL 14

Accepted Solution

by:
mgrattan earned 100 total points
ID: 6338881
Check for "MISSING" indicator in Tools/References while any code module is open.  Unchecking the MISSING item and then adding it back will usually fix the problem.  The problem is caused, typically, by a DLL/OCX that is of a different version than the one used on the development machine.
0
 
LVL 14

Expert Comment

by:mgrattan
ID: 6338884
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.
0
Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

 
LVL 54

Expert Comment

by:nico5038
ID: 6338907
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)
0
 

Author Comment

by:frankhampshire
ID: 6338925
mgrattan. Thanks Heaps. This was right on the money. Take these points, but dont spend 'em all in once place ;-)
0
 
LVL 14

Expert Comment

by:mgrattan
ID: 6341170
Thanks, glad I could help.

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

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.

756 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question