V
Valkon
I have am Access 2007 form with several subform controls and each has the
master/child fields set. The main form has a filter based on a unbound
checkbox. These subforms work fine and the filtering works as intended on
the main form.
However, I am unable add filtering of the subforms based on a value on the
main form. I have tried several methods including:
me.subform.form.filter = strFilterCondition
me.subform.form.filteron = true
me.subform.form.requery
and
me.subform.form.recordsource = strNewSQLStatement
me.subform.form.requery
me.subform.requery
but the subforms do not get filtered. Even though the code is executing,
the filter does not seem to get set, nor does the recordsource seem to be
updated (when I switch to layout view from form view, the subforms still show
their original filters and recordsources).
I have also tried removing the master/child entries and included that
"filter" in strFilterCondition and strNewSQLStatement with no luck.
Is there something I may be overlooking?
We have several records in the main table that have the same Master_ID but
have different revision dates. The goal is to limit the subforms to only
display data where the master.revision_date >= child.revision_date (and
master_id = child's parent_id which should be taken care of with the subform
control master/child entries no?).
Thanks in advance,
Valkon
master/child fields set. The main form has a filter based on a unbound
checkbox. These subforms work fine and the filtering works as intended on
the main form.
However, I am unable add filtering of the subforms based on a value on the
main form. I have tried several methods including:
me.subform.form.filter = strFilterCondition
me.subform.form.filteron = true
me.subform.form.requery
and
me.subform.form.recordsource = strNewSQLStatement
me.subform.form.requery
me.subform.requery
but the subforms do not get filtered. Even though the code is executing,
the filter does not seem to get set, nor does the recordsource seem to be
updated (when I switch to layout view from form view, the subforms still show
their original filters and recordsources).
I have also tried removing the master/child entries and included that
"filter" in strFilterCondition and strNewSQLStatement with no luck.
Is there something I may be overlooking?
We have several records in the main table that have the same Master_ID but
have different revision dates. The goal is to limit the subforms to only
display data where the master.revision_date >= child.revision_date (and
master_id = child's parent_id which should be taken care of with the subform
control master/child entries no?).
Thanks in advance,
Valkon