Blank Field

Majid Umar

Registered User.
Local time
Today, 15:32
Joined
Aug 2, 2001
Messages
22
Hi,

I created this report i.e. Letter to cutomers. In address fields the Address Line 3 can be blank and I was just wondering if there is a way to shift fields up, I know this sound crazy but worth a try! i.e.

12 Roadway
Anywhere
(Blank Address Field)
St Peter Port
Guernsey

If there is any code to which change the positions of the bottom two fields so field 4 take place of Address line 3!

Thanks!
 
Set the CanShrink and CanGrow properties for every control in the DetailSection and for the DetailSection itself to Yes. As long as no control on any given line has data, the line will be suppressed.
 
Thanks That Works Fine!

I tried that before but I was just applying it to the Address Field and never even think about the actual Detail Section!


Thanks Again!
 
As Pat says, the CanShrink, CanGrown will only work as long as there is nothing in that line so, if you have a date field to the right of the report but it's in line with Address Line 3 to the left of the report, Address Line 3 can't shrink. Another way to do it would be to create an unbound text box and use the following expression:

=IIf(IsNull([Title]),"",[Title] & " ") & IIf(IsNull([FirstName]),"",[FirstName] & " ") & IIf(IsNull([Surname]),"",[Surname] & Chr(13) & Chr(10)) & IIf(IsNull([Add1]),"",[Add1] & Chr(13) & Chr(10)) & IIf(IsNull([Add2]),"",[Add2] & Chr(13) & Chr(10)) & IIf(IsNull([Add3]),"",[Add3] & Chr(13) & Chr(10)) & IIf(IsNull([Town]),"",[Town] & ", ") & IIf(IsNull([Postcode]),"",[Postcode] & Chr(13) & Chr(10)) & IIf(IsNull([County]),"",[County])

A bit scary to look at (obviously the field names would need changing) but it works well. The Chr(13) & Chr(10) is what is used to return to the next line, you need them both for it to work.
 
Another consideration (I think also from our favorite Pat) is that overlapping controls cannot shrink. Put at least a little white space between them.

David R
 
David is right there is still some gap between two fields and in office copy it didn't work as I had ref No on RHS. I do appreciate your help and time.

Majid!
 

Users who are viewing this thread

Back
Top Bottom