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

Format Label Text 1

Status
Not open for further replies.

BenSC

Technical User
Jul 24, 2001
43
GB
Hi All,
This sounds like a stupid question, but I can't find an answer anywhere. All I want to do is to put a carriage return between two lines in a label on one of my reports. I have tried using the Chr(13) solution, but it just takes it as part of the caption.
Is there any way of doing this short of creating different labels for each line?

Thanks
Ben Cooper
 
Hi!

If you're doing this in the reports design view, use SHIFT + ENTER for repeated carriage returns.

If you're doing it thru code, ie in the reports on open event, something like this should do the trick:

me!LabelName.Caption = "what goes on line 1" & vbcr & vblf & "line 2"

It seems ms access likes both carriage return and linefeed (chr(10)) in A97 you can use vbCr and vbLf, in later versions vbCrLf

HTH Roy-Vidar
 
Thanks Roy,
The SHIFT + ENTER solution works great. You've solved one of my major annoyances with Access reports.

Ben Cooper
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top