Need help with IIf statement

  • Thread starter Thread starter Scott A
  • Start date Start date
S

Scott A

This IIf statement should create dynamic groupings for a
report based on the values selected by the user from the
option group on a form.

I have a form with three group options, each of which
should designate the field which should be used to group
data on a report.

In order to accomplish this, I would like to insert an
IIf statement into the Sorting and Grouping property of
the report. I am having a little trouble building the
IIf statement (as I am not very familiar with them...)

I m wondering how to write an expression that selects the
appropriate grouping parameter from any one (or even no
selection) of the three options I am providig in the
option group on the form.

Ideas?
 
Your options should have option values of 1, 2, and 3. This allows you to
use the Choose() function. Your column in the query would be something like:

SortMe:Choose(Forms!frmA!optSortMe, [FieldA], [FieldB], [FieldC])
 
Back
Top