[AccessD] Compile Error A97

StaRKeY starkey at wanadoo.nl
Sat Jun 24 04:50:53 CDT 2006


Hi Mark,

I had the same problem with a customer, once the 1st line like you mentioned
set db=currentdb() does not work the problem is almost certain the
installation of MS Office/Access... Once MS Access/Office had been
re-installed all worked fine again.

You could also try a 'decompile' and a compile (having dao 3.6 referenced)

Run... "C:\program files\microsoft office\office\msaccess.exe"
"c:\yourapp.mdb" /decompile

Or if this does not help, try importing all objects in a new database
created on the new machine. My guess though is that is has to do with the MS
Access on the other machines.... One way to find out is to create a new mdb
on the other machine then open a new module, set a ref to dao3.6 and in the
immediate window type '?currentdb.name' (without the ''). If you get an
error something is wrong with the installed Access version or the VBA dll's.


Regards,
Eric

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Mark A Matte
Sent: Friday, June 23, 2006 8:49 PM
To: accessd at databaseadvisors.com
Subject: [AccessD] Compile Error A97

Hello All,

In A97 I built a db...runs fine on my machine...pu it on other machines(same

OS same Access Version) and get the following:  Compile error:  Function or 
Interface marked as restricted, or the function uses an Automation type not 
supported in Visual Basic.

There are no missing references...the only difference I can find is I have a

reference to DAO 3.51 and they have DAO 3.6
I change mine to DAO 3.6 and it still runs.  This seems to be the case on 
all of the machines in the office I have tested.  The 1 line it does NOT 
like seems to be "    Set db = CurrentDb()".

Any ideas on how to fix from a coding standpoint?

Thanks,

Mark A. Matte


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



---
avast! Antivirus: Uitgaande bericht is niet besmet.
Virus Gegevensbestand (VPS): 0625-7, 23-06-2006
Getest op: 24-06-2006 11:50:53 uur
avast! auteursrecht (c) 1988-2006 ALWIL Software.
http://www.avast.com






More information about the AccessD mailing list