473,225 Members | 1,250 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,225 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 3821

"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
1
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
0
by: veera ravala | last post by:
ServiceNow is a powerful cloud-based platform that offers a wide range of services to help organizations manage their workflows, operations, and IT services more efficiently. At its core, ServiceNow...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
0
by: mar23 | last post by:
Here's the situation. I have a form called frmDiceInventory with subform called subfrmDice. The subform's control source is linked to a query called qryDiceInventory. I've been trying to pick up the...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...

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.