D
David Altemir
I have an Access 2000 main form "Main1" with subform "Sub1" and
another main form "Main2" with subform "Sub2". From a button control
in "Main1", I want to open "Main2" and filter the data for "Sub2"
based on a field value for the current record in "Sub1".
Here's what I'm doing in the button OnClick event in "Main1":
DoCmd.OpenForm "Main2"
Forms!Main2!Sub2.Form.Filter = "Sub2FieldValue =" &
Me!Sub1!Sub1FieldValue
Forms!Main2!Sub2.Form.Requery
This is producing a "Access can't find the field 'Sub1' referred to in
your expression" error.
How can I express these references so I can successfully apply a
filter to the data in Sub2?
-- David
another main form "Main2" with subform "Sub2". From a button control
in "Main1", I want to open "Main2" and filter the data for "Sub2"
based on a field value for the current record in "Sub1".
Here's what I'm doing in the button OnClick event in "Main1":
DoCmd.OpenForm "Main2"
Forms!Main2!Sub2.Form.Filter = "Sub2FieldValue =" &
Me!Sub1!Sub1FieldValue
Forms!Main2!Sub2.Form.Requery
This is producing a "Access can't find the field 'Sub1' referred to in
your expression" error.
How can I express these references so I can successfully apply a
filter to the data in Sub2?
-- David