Access 2003

  • Thread starter Thread starter Mccloud
  • Start date Start date
M

Mccloud

I want to run a report and only display fields with data
and hide fields and their labels that are blank. For
example if field 1 has 50 records and 20 are blank then
hide the fields on the report for that record. If data
exist display the data and the field. Hope this makes
since.
 
No, I'm afraid it doesn't, not to me. Fields are entities that contain data
_within_ records, so "field 1 has 50 records and 20 are blank" doesn't make
any sense to me.

Do you mean "if a particular field is 'blank' for any record, then I don't
want to show that field in any other record, also? If you clarify, or
explain what you are trying to accomplish, perhaps someone can offer a
worthwhile suggestion.

Larry Linson
Microsoft Access MVP
 
In my report I list parts and prices. Some of the parts
have a compatible. When an item has a compatible, It
should display two fields. Part number and cost. If there
is no compatible I don't want the fields to display at
all. Hope this is more clear!

Thanks
 
Sounds good but I'm not sure how to make it work. Would
these be built as an event for both items. If so my
events for these items are not available. Any advise?
-----Original Message-----
In your report you want to string the fields in text
boxes using a chr(13) & chr(10). This will print the lines
that are populated and not the ones that are null.
For example the text box would read =IIf([field1] Is
Null,"",[field1] & Chr(13) & Chr(10)) &IIF([field2] Is
Null,"",[field2] & Chr(13) &Chr(10))
This will print only the lines that are populated - you
will have to do this for the label and the cost.
 
Unfortunately, no, I still don't understand what you have. You have to
address not just the report, but the underlying data.

In a table or query that is the recordsource for the report, you have
records that obviously include a part number or description and a price.
_Somewhere_ (perhaps in the same record, perhaps in a related table, or ???)
you have a "compatible" (I am assuming this means an interchangeable part).
You want to display the compatible and its price, if there is one -- would
that be on the same line as the original part and its price, or would it be
on a separate line, or could there be more than one compatible? With some
information, we may be able to help you; but without more information than I
have, I can't be of any help.

Larry Linson
Microsoft Access MVP
 
Back
Top