
HELP! -VB4 and Querydef - runtime error 3110
I'm recieving the following error when trying to set and do stored SQL
query.
Runtime 3110
Couldn't read definitions; no Read Design permissions for table or query
'mSysQueries'
I don't know what the mSysQueries refers to.
Any help will be appreciated.
Thanks, John
---------------------------------------------------------
Code:
Private Sub IndexStrip_Click()
Dim Qd As QueryDef, Rs As Recordset
Dim SQL As String
SQL = "SELECT * From Members WHERE LastName Like 'C*';"
Set Qd = MDTDataBase.Database.CreateQueryDef("MyQuery")
Set Qd = MDTDataBase.Database.QueryDefs("MyQuery")
'Create a new Recordset from the Query based on the stored QueryDef.
Set Rs = Qd.OpenRecordset(Qd, dbOpenDynaset)
'Pass the Recordset back to the Data control.
Set MDTDataBase.Recordset = Rs
End Sub
----
John P. Cox