|
-
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
-
Apr 2nd, 2002, 10:48 AM
#2
Frenzied Member
You'll need to qualify all your recordsets:
...or remove the reference to ADO in the project references (I think it's added by default in Access 2K).
-
Apr 2nd, 2002, 10:49 AM
#3
What service pack level are you runnning?
You should be at SP5.
-
Apr 2nd, 2002, 10:49 AM
#4
i don't know if you shrunk down ur code for the post.. but that SQL statement doesn not look right... the where clause...
-
Apr 2nd, 2002, 10:55 AM
#5
Thread Starter
Hyperactive Member
thanks
That ADO vers ADODB worked.
-
Apr 2nd, 2002, 10:58 AM
#6
ummm aren't you using DAO?? not ADO?
-
Apr 2nd, 2002, 11:04 AM
#7
Thread Starter
Hyperactive Member
yeah, I jsut cant make my fingers do what my mind is saying
-
Apr 2nd, 2002, 11:07 AM
#8
Bouncy Member
Originally posted by kleinma
ummm aren't you using DAO?? not ADO?
confusing much?!!?!?
-
Apr 2nd, 2002, 11:13 AM
#9
i am surprised that there isn't ODA, AOD, or OAD with .NET or something
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
|