I have a report that is based on an underlying query. I have a form that the user can pick which fields they would like to sort by, but it won't sort correctly on the report. It sorts in the query correctly, but not the report. Here is the syntax I have in the query.
(There are three of these that are driven by combo7, combo9, and combo10 on the user form)
IIf([Forms]![Report Sort]![Combo7]="Buyer",[Buyer],IIf([Forms]![Report Sort]![Combo7]="Feedyard",[Feedyard],IIf([Forms]![Report Sort]![Combo7]="Cattle Type",[Sex],IIf([Forms]![Report Sort]![Combo7]="Weight Group",[LBS Avg In],IIf([Forms]![Report Sort]![Combo7]="DateOut",[DateOut])))))
(There are three of these that are driven by combo7, combo9, and combo10 on the user form)
IIf([Forms]![Report Sort]![Combo7]="Buyer",[Buyer],IIf([Forms]![Report Sort]![Combo7]="Feedyard",[Feedyard],IIf([Forms]![Report Sort]![Combo7]="Cattle Type",[Sex],IIf([Forms]![Report Sort]![Combo7]="Weight Group",[LBS Avg In],IIf([Forms]![Report Sort]![Combo7]="DateOut",[DateOut])))))