Crosstab Queries - Showing Column Value depend on Forms!Search!Dropdown (1 Viewer)

Mohsin Malik

Registered User.
Local time
Today, 10:58
Joined
Mar 25, 2012
Messages
175
Hi Everyone, I need some guideline in crosstab queries, i want to set the criteria through form named as "Search". I am trying to display the total net amount, if Dropdown value in form "Search" is "Total Net Amount" and if the User select "Discount Only" then it shows me "Discount" values, I am trying the following expression for column value in crosstab but could not worked.

Value: IIf([Forms]![Search]![Dropdown]="Total Net Amount"),([Total Net Paid]),([Discount])) by Selecting Total as "SUM" and Crosstab as "Column Value".

That give me the following error message
The expression is typed incorrectyl, or it is too complex to be evaluated. For example. a numeric expression may contain too many complicated elements. Try simplifying the expression by assigning parts of the expression to variables

Please guide me in this matter. Thanks
 

Mohsin Malik

Registered User.
Local time
Today, 10:58
Joined
Mar 25, 2012
Messages
175
Issue Resolved by adding as
Output: Sum(IIf(IsNull([Forms]![Search]![Dropdown]),([Total Net Paid]),([Discount])))

and setting it up as Expression and Value for Crosstab Columns. Thanks
 

Users who are viewing this thread

Top Bottom