Solved

MS Access Reference

Posted on 2011-03-03
4
288 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

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

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

Suggested Solutions

Introduction When developing Access applications, often we need to know whether an object exists.  This article presents a quick and reliable routine to determine if an object exists without that object being opened. If you wanted to inspect/ite…
Phishing attempts can come in all forms, shapes and sizes. No matter how familiar you think you are with them, always remember to take extra precaution when opening an email with attachments or links.
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

777 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