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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Not print if blank 1

Status
Not open for further replies.

nirajj

Programmer
Mar 12, 2003
103
US
I am printing the address in the report.
If addressline2 is blank then I would like the city and state to move up.
Right now I get a blank line.

I tried the following code in On Format event.
If IsNull(cMAddress2) Then
addressline3.Top = 3
Else
addressline3.Top = 6
End If

However, the addressline3 prints on the top of the header. What am I doing wrong?

All help will be appreciated.. :)
 
If address 2.top = 3 then it would be printing on top of the header too, wouldn't it? It makes me wonder if your numbers are correct.

If cMAddress is null then you should shift the top value of all address lines up accordingly, line3 on top of line2, line4 where line3 used to be, etc.

Another thing you can try is to set the height of Address2 to zero, and then move address3 right underneath it, and move the other lines up as well. Then set the CanGrow property of Address2 to Yes, and if there is data in it, it will push the other data down the page.
 
Thanks lynchg

Setting height to zero and CanGrow to Yes worked just perfect... Thanks for the prompt reply :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top