L
LAS
I have a report where I must have the results of a function for use 5 times
in each of my three groups. The function is fncTotalSchoolTime. The
function executes a DLookup and work through dozens, sometimes hundreds of
rows. It does not use the same tables that are in the report's record
source. Is there a way I can execute the function just once in each report
group and store it in a variable for use in the 5 places? I thought about
storing the results in a text box, but how can I count on the text box's
being populated before these three other controls are populated? Here are
the three control sources that use the function.
=fncMinutesFormatted(fncTotalSchoolTime("class",[class_code],"",""),True)
=IIf(fncTotalSchoolTime("class",[Class_Code],"","")=0,0,FormatPercent(Sum([Reint])/fncTotalSchoolTime("class",[Class_Code],"",""),0))
=IIf(fncTotalSchoolTime("class",[Class_Code],"","")=0,0,FormatPercent(Sum([Excl])/fncTotalSchoolTime("class",[Class_Code],"",""),0))
in each of my three groups. The function is fncTotalSchoolTime. The
function executes a DLookup and work through dozens, sometimes hundreds of
rows. It does not use the same tables that are in the report's record
source. Is there a way I can execute the function just once in each report
group and store it in a variable for use in the 5 places? I thought about
storing the results in a text box, but how can I count on the text box's
being populated before these three other controls are populated? Here are
the three control sources that use the function.
=fncMinutesFormatted(fncTotalSchoolTime("class",[class_code],"",""),True)
=IIf(fncTotalSchoolTime("class",[Class_Code],"","")=0,0,FormatPercent(Sum([Reint])/fncTotalSchoolTime("class",[Class_Code],"",""),0))
=IIf(fncTotalSchoolTime("class",[Class_Code],"","")=0,0,FormatPercent(Sum([Excl])/fncTotalSchoolTime("class",[Class_Code],"",""),0))