J
Josh Grameson
In an application here I found this code bellow. When I try to compile it I
get an error on the ‘ds As Dynaset’. In another place in this database I get
same error on ‘Dim MyTable As Table’. This application was an Access 97
application and it was converted by Access to Access 2K.
Why is this failing, and can I fix this?
Function CheckDays()
iOptSetting% = DLookup("ShowDays", "Person", "[ID] =
Forms!Global!Logon")
If iOptSetting% Then
Dim db As Database, ds As Dynaset
Set db = CurrentDb()
Set ds = db.CreateDynaset("ComingImptDays")
If ds.EOF Then
iRetVal% = False
Else
iRetVal% = True
End If
ds.Close
db.Close
Else
iRetVal% = False
End If
CheckDays = iRetVal%
End Function
get an error on the ‘ds As Dynaset’. In another place in this database I get
same error on ‘Dim MyTable As Table’. This application was an Access 97
application and it was converted by Access to Access 2K.
Why is this failing, and can I fix this?
Function CheckDays()
iOptSetting% = DLookup("ShowDays", "Person", "[ID] =
Forms!Global!Logon")
If iOptSetting% Then
Dim db As Database, ds As Dynaset
Set db = CurrentDb()
Set ds = db.CreateDynaset("ComingImptDays")
If ds.EOF Then
iRetVal% = False
Else
iRetVal% = True
End If
ds.Close
db.Close
Else
iRetVal% = False
End If
CheckDays = iRetVal%
End Function