Solved

MS Access Reference

Posted on 2011-03-03
4
286 Views
Last Modified: 2012-08-13
I had this old ACCESS 97 mdb thrown at me and I want to do with it is look at the reports and extract the queries. When I open the mdb I get this message about invalid reference. It is in regards to this element called GSELib.mde. This mde is sitting in the same folder as the mdb. I know almost nothing about MS Access.  How do I resolve this invalid reference? I am using MS Access 2007 and I told it not to convert the database.
Public Function UserSetReferences()
Dim ref As Reference, thispath, LibName As String, FoundLib As Boolean
On Error GoTo ErrorProcessing
thispath = CurrentDb.name
i = 0
Do Until trash = "\"
    i = i + 1
    filepath = Left(thispath, Len(thispath) - i)
    trash = Right$(filepath, 1)
Loop
PathCrntMDB = filepath
ChDir filepath
'GSEAcctng.mda
Set ref = References.AddFromFile(filepath & "GSELib.mde")
ExitFunction:
Exit Function

ErrorProcessing:
DoCmd.SetWarnings True
DoCmd.Hourglass False
If Err.Number = 32813 Then Resume Next

UserErrRoutine Application.CurrentObjectName
Resume ExitFunction
End Function

Open in new window

0
Comment
Question by:rwheeler23
  • 2
  • 2
4 Comments
 
LVL 28

Accepted Solution

by:
omgang earned 500 total points
ID: 35027583
Try adding the reference manually.
Open the VBE (visual basic editor) - with the mdb file open in Access key Alt + F11
In the VBE choose References from the Tools menu
Click Browse
In the Files of type: drop down select MDE
Browse to the directory where the mde file is located and select it

Any errors?
OM Gang
0
 

Author Comment

by:rwheeler23
ID: 35027940
Once I got past the message about stopping the debugger I can at least see the tables. My problem now finding the query he used to populate one of the tables. I think he was hiding the actual code in and mde file and when I try to open the mde file, MS Access 2007 tells me it cannot convert and mde file.
0
 
LVL 28

Expert Comment

by:omgang
ID: 35028161
The mde file was created from an mdb.  The conversion to mde would have removed any readable code when it was compiled.  Any chance finding the original mdb file?
OM Gang
0
 

Author Comment

by:rwheeler23
ID: 35028185
Let me see if I can pull this guy out of retirement.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Regardless of which version on MS Access you are using, one of the harder data-entry forms to create is one where most data from previous entries needs to be appended to new records, especially when there are numerous fields and records involved.  W…
Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
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.
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

759 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now