|
-
Apr 2nd, 2002, 10:46 AM
#1
Thread Starter
Hyperactive Member
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|