Dynamic Filtering a subform based on another form

A

amiga1200

I have a record selection form on which I have a check box to choose primary
or all contacts.
I have a command button to open my main form which has contacts as a
subform, on the onopen event I want a macro to filter the contacts based on
then check box on the record selection form.
All I get are errors, saying I have mispelled it,

OnLoad Event:
SetValue
[Forms]![SearchCont].[Filter]
[Forms]![SearchCont]![Primary]=Abs([Forms]![RecSelect]![Check66])

I want to end up with filter should be Primary=1

But all I get is the following error message

Action Failed
Macro Name: TestSelections
Condition: True
Action Name: SetValue
Arguments: [Forms]![SearchCont].[Filter],
[Forms]![SearchCont]![Primary]=Abs([Forms]![RecSelect]![Check66])

Help please
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top