Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

is there a way to check if value exists in report? 2

Status
Not open for further replies.

Bastien

Programmer
May 29, 2000
1,683
CA
I have some fields in a report that may be null (no values), is there a way to check if the value is null and then resize the control on the report?

In more detail, I have 8 different fields for address data (stipulated by another program and can not be changed)

address line 1
address line 2
address line 3
address line 4
city
state
zip/postalcode
country

if not all the fields are filled, can I suppress the blank ones on the report?

The report is a statement reports and may have many members, some who will have data and others who will not.

TIA

Bastien

There are many ways to skin this cat,
but it still tastes like chicken
 
Set the CanShrink property of the fields that may not have data to Yes. If your report data is laid out as you described, without labels, this will work. If, however, you have labels on those rows, or other fields, the field you wish to shrink will only shrink to the height of the label and/or other field on the same row.
 
thanks Bastien

There are many ways to skin this cat,
but it still tastes like chicken
 
Another way to do this is to use the TRIM function.

Set the control source for each of your Address line controls to =Trim([Address Line 1]). This will delete any leading or trailing spaces in the control field. If it is all spaces (or no data) the control will not appear on the report.

HTH
Lightning
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top