473,324 Members | 2,356 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

Chr$(13) & Chr$(10) give me a problem in main menu label caption property...

MLH
I run the following command in main menu form open event code...

Me!MainMenuLabel.Caption = DLookup("[Owner]", "qryAdminList") &
Chr$(10) & Chr$(13) & DLookup("[OwnerAddr]", "qryAdminList") &
Chr$(10) & Chr$(13) & DLookup("[OwnerCSZ]", "qryAdminList")

The caption on the label is not what I want at all. All 3 dlookups
return valid strings. Its the carriage returns and line feeds. They
are showing as literal characters instead of doing what I'd hoped
for.

If I enter the property into the properties box manually like this...
Line one CTRL-ENTER, Line two CTRL-ENTER, Line three CTRL-ENTER,
the lable displays exactly as desired. What's wrong with my syntax
above?
Nov 13 '05 #1
2 3825

"MLH" <CR**@NorthState.net> wrote in message
news:9b********************************@4ax.com...
I run the following command in main menu form open event code...

Me!MainMenuLabel.Caption = DLookup("[Owner]", "qryAdminList") &
Chr$(10) & Chr$(13) & DLookup("[OwnerAddr]", "qryAdminList") &
Chr$(10) & Chr$(13) & DLookup("[OwnerCSZ]", "qryAdminList")

The caption on the label is not what I want at all. All 3 dlookups
return valid strings. Its the carriage returns and line feeds. They
are showing as literal characters instead of doing what I'd hoped
for.

If I enter the property into the properties box manually like this...
Line one CTRL-ENTER, Line two CTRL-ENTER, Line three CTRL-ENTER,
the lable displays exactly as desired. What's wrong with my syntax
above?


Use Chr$(13) & Chr$(10)
not,
Chr$(10) & Chr$(13)

Or, better still, use:
vbCRLF

Nov 13 '05 #2
Or vbNewLine which might be easier to remember....

Nov 13 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

16
by: Eddie B. | last post by:
Does anyone know how to do Chr$(13) in .NET? Thanks, Eddie
6
by: C L Humphreys | last post by:
Hi, I'm trying to concatenate address fields and insert a LF&CR after each line. The SQL I use is based on select address1 & chr(10) & chr(13)& address2 & chr(10) & chr(13)& address3 & ...
1
by: jdph40 | last post by:
I am trying to enter text to look like paragraphs in a text box on a report, making it look like a memo. I enter (Chr$(13) & Chr$(10) & Chr$(10)) to insert a carriage return and 2 line breaks, but...
2
by: lauren quantrell | last post by:
Has anyone cunstructed a function to remove multiple carriage returns and replace it with a single return? Replace(mytext, Chr(13) & Chr(10) & Chr(13) & Chr(10), Chr(13) & Chr(10)) ... only...
2
by: crjunk | last post by:
I have the following code in my web page. Dim tmpReplace As String 'Giving tmpReplace the value from the textbox on the webform. tmpReplace = txtComments.Text.Trim 'Prevents report from...
10
by: Dan Nash | last post by:
Lo, In a previous version of an app, I used replace to convert multiline text boxes to something easier to put in a database, and then i used replace(chr(13), "<br>") when i needed to show the...
1
by: Felix | last post by:
We have a problem with the Chr(13) and WebServices (we are using VB.NET 2003). If we have a string that contains the Chr(13) and the Chr(10) (just the vbCrLf characters) and we pass it through a...
5
by: Computer Guru | last post by:
I have a form I'm using as a dialog box. It has default text that is two paragraphs. It has a function setText(byval text as string) that specifies the text in the read-only textbox that's on...
4
by: ebasshead | last post by:
Hi Everybody, I'm trying to figure out what the opposite of Chr$(10)... "line feed" is, does one exist? Cheers Eddie
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.