getting the Number of records to print on a report

J

jvcs

I use =Count(LastNames) in my design view of my report but my return resulte
was #Error, what do I do to get the number of names I entered in my report?
 
S

S.Clark

Is LastNames an actual field name? If not, correct the name in the
expression. (e.g. =Count(LastName) )

Another common mistake is to update the control source, but not change the
controlname. Try changing the controlname to something like
'txtCountofLastNames' (Something that is far different than any name that
might be in the recordsource fieldnames)
 
A

Allen Browne

Change the Name property of the text box.
It must not be the same as the name of a field in the report.
For example, it must not be called LastNames.

If there is a name in every record, you can just use:
=Count("*")
 
J

Jeff Boyce

A bit of terminology...

Access stores data in tables, and provides a printout of data in reports.
You can't really "enter [data] in [your] report".

When Access says "#Error", it can't understand what you told it to do.

What is "LastNames"? Is that a control in your report? If so, you'll need
to use the underlying fieldname, not the control name. Have you tried using
Access HELP for exact syntax requirements for the Count() function?

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
Top