Run-time error '13': Type mismatch

J

JackO

I am getting the following error:

Run-time error ‘13’:
Type mismatch

My code that I am running is:

Private Sub btnSubmit_Click()
Dim dbMyDB As Database, qdMyQuery As QueryDef, rs As Recordset
Set dbMyDB = CurrentDb
Set qdMyQuery = dbMyDB.QueryDefs("qry2EAST")
Set rs = qdMyQuery.OpenRecordset()
End Sub

There are no parameters in the stored query as it is a simple select query.

Any help or insight into why I am getting this error would be appreciated.
 
D

Duane Hookom

You should be more explicit in your Dim's
Dim dbMyDB As DAO.Database, qdMyQuery As DAO.QueryDef, rs As
DAO.Recordset
This might or might not fix your problem. If it doesn't work, consider
coming back with the SQL view of qry2EAST.
 
Top