Problem with function on Access 97

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a database that used to run just fine, but someone re-installed Access
2000 on this machine, and I had to re-install Access 97 (renaming hatten.ttf
to .sav first)

Now, I'm getting a compile error on the following code:

Function GetJobInfoReport()
Dim dbs As Database
Dim rstjobin As Recordset
Dim rstjobid As Recordset

' Open current database
Set dbs = CurrentDb

The err msg reads: function or interface marked as restricted, or the
function uses an automation type not supported in visual basic. When I click
OK, it highlights Set dbs = CurrentDb
 
Check the reference in your DB, open code, tools, reference, check if
anything missing there.
Check if you have reference to Microdsoft DAO
 
I'm sorry, I don't understand what you mean by checking the reference.
Someone else wrote this code, I am a VB novice. I normally work with macros,
queries, etc. It works just fine on other machines, I get this error only on
this one computer. (The database itself is on the server).
 
Me again - I opened the code looked at tools/references. Here's what I have:

Visual Basic for Applications
MS Access 8.0 Object Library
MS DAO 2.5/3.51 Compatability Library

Please help me!
 
SusanJane said:
Me again - I opened the code looked at tools/references. Here's what
I have:

Visual Basic for Applications
MS Access 8.0 Object Library
MS DAO 2.5/3.51 Compatability Library

Eliminate the last one and instead find and check the "Microsoft DAO 3.51
Object Library". The one you have checked now was produced when an old
Access 2.0 file was converted to Access 95, but should no longer be used.
 
Back
Top