min value from 2 calculated text boxes on a report footer

D

dirty70bird

Trying to input the minimum value from 2 calculated text boxes, CPU and CPL,
into the CPK text box.

All three text boxes are in the report footer. The CPU and CPL text boxes
are calculated from values from the report detail.

This is the code that I am using in the control source in the CPK text box:
=Min ([CPU],[CPL]). I get an error when the report is previewed.
I also tried the "smallest" in place of the "min" above to no avail.
Any ideas?
 
M

Mauricio Silva

Min is an aggregate clause for SQL Statements.

try

=iif([CPU]<[CPL],[CPU],[CPL])

Mauricio Silva
 
D

Dirty70bird

Worked perfectly, thanks again!!

Mauricio Silva said:
Min is an aggregate clause for SQL Statements.

try

=iif([CPU]<[CPL],[CPU],[CPL])

Mauricio Silva

dirty70bird said:
Trying to input the minimum value from 2 calculated text boxes, CPU and CPL,
into the CPK text box.

All three text boxes are in the report footer. The CPU and CPL text boxes
are calculated from values from the report detail.

This is the code that I am using in the control source in the CPK text box:
=Min ([CPU],[CPL]). I get an error when the report is previewed.
I also tried the "smallest" in place of the "min" above to no avail.
Any ideas?
 
Top