Link to home
Start Free TrialLog in
Avatar of terpsichore
terpsichore

asked on

A quick one - setting filter based on calculated control

Dear experts -
I am trying to set a filter on a subform based on a control on that subform. The control in question is a checkbox, which is based on a formula (a complex one).

I am attempting to build a string and then setting the filter on the subform to that checkbox being true. I look at the subform BEFORE applying the filter and the checkbox is showing up as correctly checked.

I then apply the filter, using the code below, and no records appear.

    If Me!chkNeed2ndApp = True Then strfilter = strfilter & " and [Forms]![Project].sfPartsLines.Form.chkNeed2ndApp = TRUE"

Open in new window


(Me!chkNeed2ndApp is the control in the parent form that invokes the filtering sub)

Any idea what's wrong with my syntax/approach?

Many thanks.
ASKER CERTIFIED SOLUTION
Avatar of Scott McDaniel (EE MVE )
Scott McDaniel (EE MVE )
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of terpsichore
terpsichore

ASKER

thank you - this led me to the solution.