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

Setting Label Caption With Multiple Lines of Text

Status
Not open for further replies.

billschu

Technical User
Apr 3, 2001
38
US
Hi - hopefully this is an easy one.

I am trying to set the caption of a label through code, and I want the caption to be split into multiple lines. I tried to use the chr(13) to split the text but it didn't work, it displayed a square instead of performing the carriage return. My code looked like this:

lblMessage.caption = "This is the first line" & chr(13) & "This is the second line".

Each line will be a different length so I can't just rely on the word wrapping to do this for me.

Any thoughts?

Thanks,
Bill
 
You may try this:
lblMessage.caption = "This is the first line" & vbCrLf & "This is the second line"

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
That works perfectly - thank you very much,

Bill
 
Hi,

I am using linked tables between my interface and back end (both Access). The back end deletes it's data and then downloads new data every day from our main Oracle ERP database. Because of this, the file size keeps growing unless I compact the database every day after deleting the old data. And it is a lot of data I'm downloading every day, after a week it can get up to 500mb. However, if someone has a linked table open in their interface (which is linked to forms and such), they will have a lock on my database and I will not be able to compact it. Any suggestions on how to manage this (i.e. sever the link, or kick them out somehow?).

Thanks,
Bill
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top