D
darb
Thanks for taking the time to read my question.
I am trying to create a recordset from a query. Here is
my code...
Dim dbs As Database, rst As Recordset
Dim TheProducerID As String
Dim rst1 As Recordset
Set dbs = CurrentDb
Set rst = dbs.OpenRecordset("qryFilter1ProducerName")
Set rst = dbs.OpenRecordset("tblData")
rst.MoveFirst
Do Until rst.EOF
TheProducerID = [qryFilter1ProducerName]!
[FeederProducerID]
Loop
rst.Close
Set dbs = Nothing
When the OpenRecordset("qryFilter1ProducerName") line is
reached, I get an error that says "Too few parameters.
Expected 1." What does this mean, and how do I fix it?
In my query, I have the criteria linked to a combo box on
the form that this code runs from.
thanks again for the help.
Darb
SQL of my query:
SELECT tblFeederProducer.FeederProducerID,
tblFeederProducer.FeederProducerName
FROM tblFeederProducer
WHERE (((tblFeederProducer.FeederProducerName)=[Forms]!
[frmFdrAgreements]![FeederProducerName]));
I am trying to create a recordset from a query. Here is
my code...
Dim dbs As Database, rst As Recordset
Dim TheProducerID As String
Dim rst1 As Recordset
Set dbs = CurrentDb
Set rst = dbs.OpenRecordset("qryFilter1ProducerName")
Set rst = dbs.OpenRecordset("tblData")
rst.MoveFirst
Do Until rst.EOF
TheProducerID = [qryFilter1ProducerName]!
[FeederProducerID]
Loop
rst.Close
Set dbs = Nothing
When the OpenRecordset("qryFilter1ProducerName") line is
reached, I get an error that says "Too few parameters.
Expected 1." What does this mean, and how do I fix it?
In my query, I have the criteria linked to a combo box on
the form that this code runs from.
thanks again for the help.
Darb
SQL of my query:
SELECT tblFeederProducer.FeederProducerID,
tblFeederProducer.FeederProducerName
FROM tblFeederProducer
WHERE (((tblFeederProducer.FeederProducerName)=[Forms]!
[frmFdrAgreements]![FeederProducerName]));