We help IT Professionals succeed at work.
Get Started

A quick one - setting filter based on calculated control

terpsichore asked
Last Modified: 2015-08-05
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.
Watch Question
Infotrakker Software
Most Valuable Expert 2012
Top Expert 2014
This problem has been solved!
Unlock 1 Answer and 2 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE