By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,400 Members | 981 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,400 IT Pros & Developers. It's quick & easy.

opening recordsets

P: n/a
The below code generates a run time error 13 on last line .. 'type mismatch'
but why??

(Yes I have checked the spelling of table TblPass )

Dim Db As Database

Dim Rec As Recordset

Set Db = CurrentDb()

Set Rec = Db.OpenRecordset("TblPass", dbOpenDynaset)

many thanks

geoff
Nov 12 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
You need to go to References and uncheck MS ADO and check MS DAO. Then change
your Dim statements to:
Dim Db As DAO.Database

Dim Rec As DAO.Recordset
--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
re******@pcdatasheet.com
www.pcdatasheet.com
"Geoff" <g.*****@ntlworld.com> wrote in message
news:RK**********************@newsfep2-win.server.ntli.net...
The below code generates a run time error 13 on last line .. 'type mismatch'
but why??

(Yes I have checked the spelling of table TblPass )

Dim Db As Database

Dim Rec As Recordset

Set Db = CurrentDb()

Set Rec = Db.OpenRecordset("TblPass", dbOpenDynaset)

many thanks

geoff

Nov 12 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.