Problem with function on Access 97

S

SusanJane sjl

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
 
O

Ofer

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

SusanJane sjl

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

SusanJane sjl

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

SusanJane sjl

Thank you for the info, but how do I get the DAO 3.51 - can I download that
from somewhere?
 

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