Strings

fernin8r

Registered User.
Local time
Today, 14:49
Joined
May 28, 2002
Messages
142
Is there a way to have a carriage return inside a string for example:


" *NEW LINE* "
 
vbnewline, vbcrlf

You can make use of vba constants incorporated as as string and constant and string.

"my dog" & vbnewline & "has fleas"

There are other combo's also

VBA help/constant/misc contstants:

The following constants are defined in the Visual Basic for Applications type library and can be used anywhere in your code in place of the actual values:

Constant Equivalent Description
vbCrLf Chr(13) + Chr(10) Carriage return–linefeed combination
vbCr Chr(13) Carriage return character
vbLf Chr(10) Linefeed character
vbNewLine Chr(13) + Chr(10) or, on the Macintosh, Chr(13) Platform-specific new line character; whichever is appropriate for current platform

I don't know of any within the string itself.
 
Thanks...that worked...

Another question.

Is there a way to bold a single line out of a multi line Label


example:

i have on a report:
---------------------------------------------

Mech Notes:
Note 1:
Note 2:

Elec Notes:
Note 1:
Note 2:

-----------------------------------------------
All of this is in one label...I would like to make "Mech Notes" and "Elec Notes" BOLD if i could. Is there a way to do that?

Thanks
 
All of this is in one label...I would like to make "Mech Notes" and "Elec Notes" BOLD if i could. Is there a way to do that?

No, not as you have it built. Yes, if you are willing to build it a bit differently.

You see, Access is not Word. Word has the ability to do selective character mucking - bold, Italic, underscore, etc. - character by character as needed. Word has a mechanism to store attributes by character if needed. Access does not.

A single entity within Access has a single set of attributes. Bold, Italic, font size, font name, etc. - treated as a group. All or nothing at all. Because Access is not a word processor.

So the way to make your label parts selectively bold is to make them separate entities. The separate entities can be emboldened or not as you choose.
 
I thought so....
oh well,


thanks for your help. :D
 

Users who are viewing this thread

Back
Top Bottom