CptCrusty1
Programmer
I'm trying to run some real simple code at home. I've used this before at work but can't make it function at home. Really simple example:
DIM rs as Recordset
DIM db as Database
DIM strSQL as String
set db = CurrentDb()
strSQL = "SELECT * FROM tblMyTable"
set rs = db.OpenRecordset(strSQL, dbOpenDynaset)
This is as far as my code gets. The "set rs = ....." statement always always always generates a "TYPE Mismatch" error. I've checked my reference libraries in the Code Editor and my DAO (3.6), and ADO (2.7) libraries are set. I can't figure out for the life of me why this won't work on my two computers at home, but will work on my PC at work. Please help.
Thanks.
Rich.
DIM rs as Recordset
DIM db as Database
DIM strSQL as String
set db = CurrentDb()
strSQL = "SELECT * FROM tblMyTable"
set rs = db.OpenRecordset(strSQL, dbOpenDynaset)
This is as far as my code gets. The "set rs = ....." statement always always always generates a "TYPE Mismatch" error. I've checked my reference libraries in the Code Editor and my DAO (3.6), and ADO (2.7) libraries are set. I can't figure out for the life of me why this won't work on my two computers at home, but will work on my PC at work. Please help.
Thanks.
Rich.