del 2003 al 2000

H

Helen

Hola todos:

Tengo el siguiente código de Access 2003 que no funciona en Access 2000
(lamebntablemente la BD ha de ser en 2000), el cual copio a continuación:

Function apEnableShift()
On Error GoTo errEnableShift

Dim db As Database
Dim prop As Property
Const conPropNotFound = 3270

Set db = CurrentDb()
db.Properties("AllowByPassKey") = True

Exit Function

errEnableShift:

If Err = conPropNotFound Then
Set prop = db.CreateProperty("AllowByPassKey", _
dbBoolean, True)
db.Properties.Append prop
Resume Next
Else
MsgBox Err.Number & " / " & Err.Description, vbInformation +
vbOKOnly, "A V I S O"
Exit Function
End If

End Function

El problema parece ser que el A 2000 no reconoce el tipo de dato 'Database'

¿alguien sería tan amable de ofrecerme una solución para el Access 2000?.

Gracias a todos de antemano.
 
M

missinglinq via AccessMonster.com

En inglés por favor
Hola todos:

Tengo el siguiente código de Access 2003 que no funciona en Access 2000
(lamebntablemente la BD ha de ser en 2000), el cual copio a continuación:

Function apEnableShift()
On Error GoTo errEnableShift

Dim db As Database
Dim prop As Property
Const conPropNotFound = 3270

Set db = CurrentDb()
db.Properties("AllowByPassKey") = True

Exit Function

errEnableShift:

If Err = conPropNotFound Then
Set prop = db.CreateProperty("AllowByPassKey", _
dbBoolean, True)
db.Properties.Append prop
Resume Next
Else
MsgBox Err.Number & " / " & Err.Description, vbInformation +
vbOKOnly, "A V I S O"
Exit Function
End If

End Function

El problema parece ser que el A 2000 no reconoce el tipo de dato 'Database'

¿alguien sería tan amable de ofrecerme una solución para el Access 2000?.

Gracias a todos de antemano.

--
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000

Message posted via AccessMonster.com
 
R

RD

Looks like a DAO reference issue?

My Spanish (I think that's Spanish) ain't so good but, I think Helen needs to
set a reference to DAO and:

Dim db As DAO.Database

And maybe even:
Dim prop As DAO.Property

RD
 

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

Similar Threads


Top