[AccessD] CurrentDB Error

Jim Lawrence (AccessD) accessd at shaw.ca
Mon Nov 1 00:33:26 CST 2004


Hi Borge:

I am not saying this is the answer but I have never referred to the current
db using

set db = CurrentDb	try	set db = CurrentDb()

or try the old method: DBEngine(0)(0) for accessing the current db.

Another thing to do would be to check whether there is a reference to
Microsoft Access 11.0 Object library, in addition.

I am not sure whether an old Access97 applications actually works in an XP
environment...It may have to be converted. I have converted applications up
to Access2003 without error with not issues...once converted.

HTH
Jim

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com]On Behalf Of Borge Steen
Hansen
Sent: Sunday, October 31, 2004 6:51 PM
To: accessd at databaseadvisors.com
Subject: [AccessD] CurrentDB Error


Hi,
I have a some Access97 database applications that have been working for
years.
They are currently sitting on WinXP with AccessXP installed as well.

Been working on the XP box for over a year!

Recently when making a minor modification and doing a 'Compile and Save' I
get the following message on the first instance of CurrentDb

Compile Error:
Funtion or interface marked as restricted, or the function uses Automation
type not supported in Visual Basic.

I have reference to Microsoft DAO Object Library 3.6
The dao.dll is version 03.60.8618.0

Even if I try to disambiguate the thing, the compile error comes up:

like:

dim db as DAO.Database
set db = CurrentDb

when compiling it will error on the set db = CurrentDb line.

Can anyone help me to shed light on what is going on?


Regards
Borge
Gold Coast, Australia


---
Outgoing mail is certified Virus Free by AVG Anti Virus System.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.773 / Virus Database: 520 - Release Date: 5/10/2004

--
_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com




More information about the AccessD mailing list