Filtering Records to Include a Single Field Value


This demonstration of Action Scripting adds a button to the Edit_Customer_Info form. This script will restrict all the records that the form displays to those where "MA" is the value in the Bill_State_Region field.

    • Sketch a button on the form.

    • Enter "MA Only" into the Label field.

    • Click Launch Script Editor.

    • Click Add New Action.

    • Select "Query" from the Category list and "Run Custom Query" from the Action list. Click OK.

  1. Click the Filter ('funnel' icon) button at the right side of the Filter field.

  2. Select the "Bill_state_region" field, the "is equal to" operator, and enter "MA" into the first condition. Click OK.

  3. The result looks like this.

  4. Click Next > Finish > Finish to return to the Form Editor.

  5. Click Save.

See Also