Forum Discussion

Tony2021's avatar
Tony2021
Iron Contributor
Sep 28, 2024
Solved

Filter Form and Syntax

Hello Experts,   I am trying to filter a form based on a combo box and I need 2 criteria.  I can filter with 1 criteria no issue but adding another criteria that is TEXT is the problem.   In the b...
  • George_Hepworth's avatar
    Sep 28, 2024

    Tony2021 

     

    Please confirm.

     

    In a table, you have a field named [ExpiredYN], correct?

     

    This field, [ExpiredYN], is configured as a combo box with a value list row source. The values in that value list are  "Terminated";"Active", correct?

     

    In that case, the expression posted should work with one small exception. There is an extra single quote shown in red here:  & "' And ...

     

     & "' And [ExpiredYN] = '" & Me!cboStatus & "'"

     

    should be

     & " And [ExpiredYN] = '" & Me!cboStatus & "'"

     

     

     

     

Resources