IIF in MS Access Reports does not work in ADP Reports

  • Thread starter Thread starter T.J. Bernard
  • Start date Start date
T

T.J. Bernard

I am not sure why, but my IIF function fields will not
work in my ADP reports. I have an IIF set up to determine
if a field is null, and if so, just print that null field,
and if not, concatenate the field with another field.

IIF(IsNull([Volume]), [Volume], [Volume] & " OF " & [OF])

This works just fine in my MS Access reports but not my
ADP reports.

Any ideas?

Thank you,

T.J.
 
TJ,

I would have expected the IIf function would work if you are working solely
within the Access program, ie if you are referring to controls within the
report.

If you are trying to use the IIf within the query you will have to
substitute the SQL CASE statement.

IIF(IsNull([Volume]), [Volume], [Volume] & " OF " & [OF])

becomes

CASE [Volume] WHEN NULL THEN [Volume] ELSE CAST(Volume AS varchar(20)) + '
OF ' + [OF] END

This assumes that [Volume] is numeric and [OF] is a character type. The SQL
Server concatenation operator insists that the operands are of character
type and numeric types must be converted.

I hope I have understood your problem and this is of some use.

Rod Scoullar
 
Back
Top