Adding a IF Statement within a Select Query.

  • Thread starter Thread starter Shams
  • Start date Start date
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
 
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".
 
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])
 
Back
Top