SQL Query with subForm??

G

Guest

Situation: A have designed a form "Form1" which includes a subform
"SubForm1A" and this includes another subform "SubForm1B" For the
"SubForm1B" I have created a SQL-Query, which only contains records in case
that the a record field is equal to a SubForm1A.recordset.

But HOW can I address this field?

SELECT tblTest.* FROM ... WHERE tblTest.anID=Forms!subform1A.bID

This query does not work because Access believes "Forms!subform1A.bID" is a
parameter instead of subForm1B Field.

What am I doing wrong?
bID..is a recordset field of subform1A
 
B

Baz

Subforms don't exist in the Forms collection. Try this:

WHERE tblTest.anID=Forms!Form1!subform1A.Form!bID
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top