hi there,
I am trying to run the following code
Dim dbs As DAO.Database
Dim rst As DAO.Recordset
Dim qry1 As String
Set dbs = CurrentDb
qry1 = "select * from pupil where(((pupil.provider) = [Enter the Provider Id]))"
Set rst = dbs.OpenRecordset(qry1, dbopendynaset)
Set Me.Form("subf").RowSource = rst
Here "subf" is the name of my subform in the main form.
But I am getting the error "Too few Parameters, Expected 1"
Can anybody tell me where I am going wrong
Many thanks
I am trying to run the following code
Dim dbs As DAO.Database
Dim rst As DAO.Recordset
Dim qry1 As String
Set dbs = CurrentDb
qry1 = "select * from pupil where(((pupil.provider) = [Enter the Provider Id]))"
Set rst = dbs.OpenRecordset(qry1, dbopendynaset)
Set Me.Form("subf").RowSource = rst
Here "subf" is the name of my subform in the main form.
But I am getting the error "Too few Parameters, Expected 1"
Can anybody tell me where I am going wrong
Many thanks