Solved

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

Posted on 2001-07-31
6
350 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
  • 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
Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

 
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

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

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

Most if not all databases provide tools to filter data; even simple mail-merge programs might offer basic filtering capabilities. This is so important that, although Access has many built-in features to help the user in this task, developers often n…
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

785 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