B
Brad
Thanks for taking the time to read my question.
I am trying to create a record set from a query. The
query returns 1 record.
This works:
Set qdf = dbs.QueryDefs("qryTest")
But I don't want to make another query in my database,
but rather use SQL in the code.
Shouldn't this work?
Set qdf = dbs.QueryDefs("SELECT
tblGeneticsDefaults.Source,
tblGeneticsDefaults.GeneticType " & _
"FROM tblGeneticsDefaults " & _
"WHERE
(((tblGeneticsDefaults.Source)=[Forms]![frmMBarn]!
[LivestockSource]));")
I keep getting an error. 3265 Item not found in this
collection.
what am I doing wrong?
Thanks,
Brad
I am trying to create a record set from a query. The
query returns 1 record.
This works:
Set qdf = dbs.QueryDefs("qryTest")
But I don't want to make another query in my database,
but rather use SQL in the code.
Shouldn't this work?
Set qdf = dbs.QueryDefs("SELECT
tblGeneticsDefaults.Source,
tblGeneticsDefaults.GeneticType " & _
"FROM tblGeneticsDefaults " & _
"WHERE
(((tblGeneticsDefaults.Source)=[Forms]![frmMBarn]!
[LivestockSource]));")
I keep getting an error. 3265 Item not found in this
collection.
what am I doing wrong?
Thanks,
Brad