Options Buttons/Groups and ultimate Value

G

Guest

Hi, I've got a query that successfully pulls information based on filters
selected in a form. However, I would like to provide a "Not" button to show
them everything except what they just pulled - so they can update a unique
selection, then update everything but what they just changed.

Problem: I can't make the expression within the query recognize the value of
the option group

Query Expression:
IIf([Forms]![Criteria Only]![FG Options]=[Forms]![Criteria
Only]![FGOptionT],Not (IIf([Forms]![Criteria
Only].[FdGroupSelect]="0",[Monthly NDA Statement Data]![Fund Group
Number],[Forms]![Criteria Only].[FdGroupSelect])),IIf([Forms]![Criteria
Only].[FdGroupSelect]="0",[Monthly NDA Statement Data]![Fund Group
Number],[Forms]![Criteria Only].[FdGroupSelect]))
Help!
 
A

Allen Browne

It would be much easier and more flexible to leave the criteria out of the
query, and build a Filter string.

You can handle nulls, concatenate the "Not " to the clause, add brackets
around the various parts, and ignore any other criteria boxes where the user
did not enter anything. Ultimately this becomes the Filter for your form, or
the WhereCondition for OpenReport.

If that sounds like it might work for you, there is an example of applying
criteria that way in this article:
Search form - Handle many optional criteria
at:
http://allenbrowne.com/ser-62.html
 

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