?
Solved

MS Access Reference

Posted on 2011-03-03
4
Medium Priority
?
293 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 2000 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

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

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

Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
Explore the ways to Unlock VBA Project Password Excel 2010 & 2013 documents. Go through the article and perform the steps carefully to remove VBA Excel .xls file.
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…
Suggested Courses

864 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