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

Wrapping long Me.Print text

Status
Not open for further replies.

mcollins

Programmer
Jun 16, 1999
27
0
0
US
I am trying to output a long text string in the Detail Band OnPrint event of a report using Me.Print. When the text is wider than the width of the page, however, it just gets cut off at the end of the first line.

Is there any way to get the output of Me.Print to wrap?

Thanks,
Mike
 
I think you would need to write code that would divide your long text string into chunks to print at different CurrentY values.

I suppose you have a good reason for not using a regular text box.

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
Hi Duane,

What I was trying to do was to add formatting to the output. Like

Me.Print strPart1;
Me.FontUnderline = True
Me.Print strPart2;
Me.FontUnderline = False
Me.Print strPart3

Thanks,
Mike


 
Are you still looking for assistance? I don't understand if there is still a specific question you need answered.

I don't see any Me.CurrentX or Me.CurrentY in your code.

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
Hi Duane,

I've got all that in my code; I was just explaining my reason for not using a regular text box.

I only need further assistance if someone has another idea of how to get the output of Me.Print to wrap.

Thanks,
Mike
 
I understand now.

Me.Print will not wrap. As I stated, you would need to calculate how much of the string will fit in one line. Then use multiple Me.Print(s) to "wrap".

You may be able to find some additional help at Stephen Lebans site His site is hosted in Florida and was down for a while because of the hurricanes but it should be back up.

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top