strange printing problem

Milothicus

Registered User.
Local time
Today, 16:50
Joined
Sep 24, 2004
Messages
134
I have a report... that includes a text box in the middle of the page for comments. on formopen (and form activate, just to see if it works), i have the following code to hide the text box if there's no text to go in it.

If IsNull(Me.Comment) Then Me.Comment.Visible = False

i have two buttons on my form. one to view the report, and one to print. if a user clicks on the 'view report' button (with no comments entered), and then selects file, print, the box doesn't show up...

if the user selects the print button, the box still shows up... most likely because the report never actually opens, so the code never runs.

i really don't want to have this empty box in the middle of the report....

the reason for the two buttons is that i disable the toolbars, and i'd rather not have users using the menus at all. before i added the print button i already had one user select file, and print, without opening the report, resulting in about 30 pages of all the records being printed in the form.

any ideas?
 
M,

I would just have one button to print the report.

Get the report in Design View. On the comment field, set the CanGrow
and CanShrink properties to Yes.

Additionally, you can use the DetailPrint event to:

Code:
If IsNull(Me.Comments) Then
   Me.Comments.Visible = False
   Me.CommentsLabel.Visible = False
Else
   Me.Comments.Visible = True
   Me.CommentsLabel.Visible = True
End If

Wayne
 
Looks like canshrink did it. i had can grow on, but not shrink. thanks for the help.
 

Users who are viewing this thread

Back
Top Bottom