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!

To lose empty lines on an address section on a report? 1

Status
Not open for further replies.

Inky2201

Technical User
Jan 15, 2005
26
GB
Hello,
I have a report formatted as a letter which imports the name and address of the receiver from the database. When there is not a line imported it leaves the line blank in the report which obviously leaves a gap in the address it is going to.
I need a command which will move up the address data on the report to close up the blank line of the address.
Can anybody suggest how to do it please?
I
 
Do you have multiple controls for the name / address, or only one? The solution depends on which way you have defined the report.

"Hmmm, it worked when I tested it....
 
Hello Trevil,
Thanks for answering so promptly.
Yes I have seperate controls for each field. Name, Address1, Address2, Town etc.
Regards
I
 
Unless you have other controls on the same general line position, you can set the control 'Can Grow' and 'Can Shrink' to Yes.



"Hmmm, it worked when I tested it....
 
Or Inky, you can use 1 text box and create a string of you address...

strAddress = IIF (IsNull(txtAddress1), strAddress, strAddress & txtAddress1)
strAddress = IIF (IsNull(txtAddress2), strAddress, strAddress & vbCrLf & txtAddress2)
strAddress = IIF (IsNull(txtTown), strAddress, strAddress & vbCrLf & txtTown)
...
 
Thanks both of you. They both lokk worth trying. I will give them a try.
Thanks again
I
 
Trevil,
Thanks. It worked a treat. I cannot understand how I have not seen that before.
Zion7,
Thanks for your suggestion I have made a note of it for future reference.
It is very much appreciated.
Regards
Inky
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top