Adding a IF Statement within a Select Query.

S

Shams

Folks,
I have th efollowing parameter already in the specific Field Cell: Total
AUA2: IIf(TblIAReport![Total AUA2] Is Null,0,TblIAReport![total AUA2])

Therefore, it is looking at Field: TotalAUA2 and evaluating if it is null

I want to add another if condition which will put zero if the the Field is
less than zero (i.e. don't show negative numbers)

how do i go about doing that..usually in Excel I can do it via a nested loop
 
D

Dorian

You can nest IIF statements, e.g.
IIF(IIF(...,...,...),...,...)
or
IIF(...,IIF(...,...,...),...)
of
IIF(...,...,IIF(...,...,...))
-- Dorian
"Give someone a fish and they eat for a day; teach someone to fish and they
eat for a lifetime".
 
F

fredg

Folks,
I have th efollowing parameter already in the specific Field Cell: Total
AUA2: IIf(TblIAReport![Total AUA2] Is Null,0,TblIAReport![total AUA2])

Therefore, it is looking at Field: TotalAUA2 and evaluating if it is null

I want to add another if condition which will put zero if the the Field is
less than zero (i.e. don't show negative numbers)

how do i go about doing that..usually in Excel I can do it via a nested loop

Parameter? What parameter?
A parameter would be used to filter records, such as:
Where [DateField] Between [Enter StartDate] and [Enter EndDate].

I see an expression, which will return a value.
Try:

Total AUA2: IIf(IsNull(TblIAReport![Total AUA2]) Or TblIAReport![Total
AUA2]<0,0,TblIAReport![total AUA2])
 

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