Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Converting 97 - 2002 module (accessing table)

Status
Not open for further replies.

BFreshour

Programmer
Mar 20, 2002
84
I'm trying to convert an Access 97 database over to Access 2002. It keeps hanging in a module at the following section with "Can't find project or library" error.

I believe the format being used to access the table data is incorrect but I can't figure out what I need to do to fix it.

Here's the code:

Code:
Public Sub updateMainCaption()
    Dim cdb As Database
    Dim crs As Recordset
    Dim addC As String
    
    Set cdb = CurrentDb
    Set crs = cdb.OpenRecordset("DirLocations")
    crs.MoveLast
    crs.MoveFirst
    addC = Trim(crs![MainCaption]) & ""

It stops at the 'Trim' function (highlighting Trim). The MainCaption text-based field does exist in the DirLocations table.

Thanks for any help.
 
Argh! If I remove the Trim function it works fine. Why would using the Trim function give me the error: "Can't find project or library"?

Hmm.. Now it says I'm missing the Microsoft Common Dialog Control 6.0 (SP3) which should be C:\WINNT\SYSTEM32\COMDLG32.OCX yet that file exists.
 
I may be mistaken, but I beleive that TRIM is an EXCEL function. I lost my FORMAT function when I converted one of my databases. I was able to fix the problem by opening up a module session an re-referencing the project to the EXCEL 8.0 libray objects. When I did that, my FORMAT funciton can back and everything works fine now. You may want to give that a try. ERM
 
I fixed it by re-creating the link to the Microsoft Common Dialog Control 6.0 ActiveX Control. What a pain in the neck!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top