Count Error Upon Adding Fields to Query/Report

D

DianaS

Hi,

I am building a report based on a query. I used wizard to construct the
report, and then later realized I would need additional fields. So, I added
the new fields to the query that the report is based on. When I add the new
fields into the report (using the "field list" button, clicking and dragging
field into report), the record count and date range fields show up as errors
in the Print Preview. When I delete the new fields in the query and in the
report, the count and date fields return to normal.

Does anyone know what could be going wrong? Thanks.

Diana
 
T

Tom Wickerath

Hi Diana,
...the count and date fields return to normal.

Do you have fields named "count" and "date"? If so, be aware that these are
considered reserved words in Microsoft Access and JET. You should avoid
naming anything with a reserved word.

Reserved Words
Reserved Words in Microsoft Access
http://support.microsoft.com/?id=286335

List of reserved words in Jet 4.0
http://support.microsoft.com/?id=321266

Also, it is a good idea to name the controls on your forms and reports
different from the control source names. You can sometimes run into circular
reference errors when a calculated control references a field, and this
control has the same name as the field that is referenced.

If my answer has helped you, please answer yes to the question that reads
"Did this post answer the question?" at the bottom of the message thread.


Tom

http://www.access.qbuilt.com/html/expert_contributors.html
__________________________________________

:

Hi,

I am building a report based on a query. I used wizard to construct the
report, and then later realized I would need additional fields. So, I added
the new fields to the query that the report is based on. When I add the new
fields into the report (using the "field list" button, clicking and dragging
field into report), the record count and date range fields show up as errors
in the Print Preview. When I delete the new fields in the query and in the
report, the count and date fields return to normal.

Does anyone know what could be going wrong? Thanks.

Diana
 
D

DianaS

Hi,

For some reason my checkbox field "Qualified" is a Yes/No field in the
query, and a 1/0 field in the report. With that straightened out, the report
works normally. However, I am having trouble making a count operation to fit
my purposes. I am trying to count records belonging to a particular group
within a group.

For example, I have a unique IDNumber Field. I also have another field
(Field1) that has about 50 categories. I would like to count the number of
records belonging to each category of Field1 FOR EACH IDNumber. However,
with the DCount operation, I always end up counting from the entire pool of
records. Do you know how I can narrow down the count so that it operates
only within each IDNumber? Also, is there a way to display counts for every
Field1 category automatically without having to manually write a code for
each category? And a way to make categories with no existing records within
an IDNumber not appear on the report?

Thanks,
Diana
 
Top