Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

recordset type mismatch

Status
Not open for further replies.

abenitez77

IS-IT--Management
Oct 18, 2007
147
US
I am using ms access 2007 and i am getting this error when i run this code:

code:
Dim rst As Recordset
Dim db As Database
Dim temp As String
Dim svrname As String

Set db = CurrentDb
Set rst = Recordset

Set rst = db.OpenRecordset("tbl_AS_ReportClms", dbOpenDynaset)


error:
Runtime error 13
type mismatch

 
try this after ensuring a reference to DAO?

dim rst as dao.recordset
dim db as dao.database

a recordset can be either aodb.recordset or dao.recordset. If you do not specify access picks the first one listed in the references.
 
I would delete this first:
Set rst = Recordset


[pipe]
Daniel Vlas
Systems Consultant

 
I didn't know that ... Thanks I keep that in mind next time and adjust my code this time.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top