By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,949 Members | 899 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,949 IT Pros & Developers. It's quick & easy.

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

P: n/a
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
Share this Question
Share on Google+
2 Replies


P: n/a

"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

P: n/a
Or vbNewLine which might be easier to remember....

Nov 13 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.