D
dickminter
My query criteria references a field value on an open form
([forms]![frmName]![fieldname]). When I use the SQL
statement for this query to create a DAO recordset, I get
an error. If I remove the field reference from the SQL
statment and substitute a value, it works find.
I can solve the problem by using docmd to run the query as
a make table, and set the recordset on the the table
created, but why won't it work the other way? How else to
filter the recordset using the field value from the open
form?
DM
P.S. The purpose of the query is to create a recordset
containing all records from the open form's linked subform
with fields values from both.
([forms]![frmName]![fieldname]). When I use the SQL
statement for this query to create a DAO recordset, I get
an error. If I remove the field reference from the SQL
statment and substitute a value, it works find.
I can solve the problem by using docmd to run the query as
a make table, and set the recordset on the the table
created, but why won't it work the other way? How else to
filter the recordset using the field value from the open
form?
DM
P.S. The purpose of the query is to create a recordset
containing all records from the open form's linked subform
with fields values from both.