Link to home
Start Free TrialLog in
Avatar of Jenkins
JenkinsFlag for United States of America

asked on

Format text in a label MS Access

Hello.  It actually doesn't have to be a label. Any control you suggest will do as long as it accomplishes what I'm looking for.

Currently, I have a label on an Access form with a bunch of text in it. The text is actually a series of instructions for the user. Right now, it's all one long string. I'm trying to format it so that the instructions are separated by a couple of lines but can't get it to work. I realize I could put each instruction in a separate label but I'm trying to find out if it can be done all in one control.

Right now, the data in the lable looks something like this:

Instruction 1: Do this that and the other thing. Instruction 2: Do this that and the other thing. Instruction 3: Do this that and the other thing.

I want it to look more like something like this:

Instruction 1: Do this that and the other thing.

Instruction 2: Do this that and the other thing.

Instruction 3: Do this that and the other thing.

Thank you.
Avatar of DatabaseMX (Joe Anderson - Former Microsoft Access MVP)
DatabaseMX (Joe Anderson - Former Microsoft Access MVP)
Flag of United States of America image

This should do it:

Me.YourLabel.Caption = "Instruction 1: Do this that and the other thing." & Chr(13) & CHr(10 & "
Instruction 2: Do this that and the other thing. "  & Chr(13) & CHr(10 & "Instruction 3: Do this that and the other thing."
ASKER CERTIFIED SOLUTION
Avatar of mbizup
mbizup
Flag of Kazakhstan image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Jenkins

ASKER

Oh ok I see. So instead of typing the text directly into the label like I did, type the text into the code window. Got it. Thanks!
Just curious, which solution did you use ?

Also, you don't have to use code.  If, on the Property sheet for the Label, click into the Caption property. Then, hit Shift F2 to open the Zoom window (optional).  Then, type first line, then Control+J on the keyboard, then the next line, then Control+J and next line and so on.  This will insert a Carriage Return/Line Feed after each line.  (You won't need the double quotes).

mx