97 works, Type mismatch in 2000
Help!!, I am receiving a type mismatch error in access 2000. below is the code I always have utilized in access 97 with out issue. now in 2000 when it gets to the line Set rst = dbs.OpenRecordset.... I am receiving a Run time error 13, type mismatch. I donot understand why.
Can anyone help?
Sub LoadHolidays()
' This routine should be loaded at startup
Dim x As Integer
Dim dbs As Database
Dim rst As Recordset
Set dbs = CurrentDb
Set rst = dbs.OpenRecordset("select * from holidays where holidays;", dbOpenDynaset, dbSeeChanges)
rst.MoveLast
arrSize = rst.RecordCount
ReDim arrHolidays(arrSize) As Date
rst.MoveLast
x = 0
Do While Not rst.EOF
arrHolidays(x) = rst.Fields("Holidays")
rst.MoveNext
x = x + 1
Loop
End Sub