Look Up Function

S

Stephen

I have a class summary report and i would like to find the number of missing
assignments. The missing assigment report is from another query. Is there a
way i can create a formula in my summary report and obtain the information
from my missing assignment query. Thanks you in advance.

Stephen
 
O

Ofer

If the query return only one record, you could write in the control source of
a text field in the report

=DLookUp("FieldName","QueryName")

If you need to sum few records that return with this query use Dsum instead
=Dsum("FieldName","QueryName")
 
S

Stephen

Thanks for your help! I have another question for you.
I am trying to count the Completed Assignments field, which is a "Yes" and
"No" Data Type and place the information in the summary report. I am trying
to obtain a count of students who missed their assignments. I am using the
following formula: By the way, "Class Assignments Missed" is a Query.

DCount("Completed Assignments","Class Assignments Missed")

When i use this i obtain an error.

Thanks

Steve

I have a class summary report and i would like to find the number of missing
assignments. The missing assigment report is from another query. Is there a
way i can create a formula in my summary report and obtain the information
from my missing assignment query. Thanks you in advance.
 
D

Duane Hookom

To "count" the number of No values in a field named "MyField" in a report,
add a text box to the report footer (or group footer) with a control source
of:
=Sum([MyField]+1)
This works because the YesNo field stores a value of -1 for Yes and 0 for
No. Adding 1 to these values results in yes=0 and no=1. Summing the
expression results in a count of No values.
 
Top