468,741 Members | 2,013 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,741 developers. It's quick & easy.

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 3629

"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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

16 posts views Thread by Eddie B. | last post: by
6 posts views Thread by C L Humphreys | last post: by
2 posts views Thread by lauren quantrell | last post: by
10 posts views Thread by Dan Nash | last post: by
1 post views Thread by Felix | last post: by
5 posts views Thread by Computer Guru | last post: by
1 post views Thread by CARIGAR | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.