Problem with function on Access 97

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
 
G

Guest

Check the reference in your DB, open code, tools, reference, check if
anything missing there.
Check if you have reference to Microdsoft DAO
 
G

Guest

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).
 
G

Guest

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!
 
R

Rick Brandt

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top