Calculator

sven2

Registered User.
Local time
Today, 09:55
Joined
Apr 28, 2007
Messages
297
Hello,

after changing an mdb to an adp project the calculator that we are using in access is not working anymore. The reason for this error is the fact that this calculator uses dao reference.

The code where is goes wrong is:

Private Function checkproperty(strPropName As String) As Variant
On Error GoTo MyProc_Err
Dim dbMdb As Database, prp As Property
Set dbMdb = CurrentDb

checkproperty = dbMdb.Properties(strPropName)
MyProc_Err:
Exit Function
End Function

I am not able to change the code so this calculator should work with the DAO reference. So I was wondering if somebody has a calculator that we can use in an adp project?

Thanks in advance,
Sven.
 
I'm pretty sure DAO works in an ADP so why not just specify the library?
Code:
Private Function checkproperty(strPropName As String) As Variant
   On Error GoTo MyProc_Err
   Dim dbMdb As [b][COLOR="Red"]DAO.[/COLOR][/b]Database, prp As Property
   Set dbMdb = CurrentDb

   checkproperty = dbMdb.Properties(strPropName)
MyProc_Err:
   Exit Function
End Function
 

Users who are viewing this thread

Back
Top Bottom