Re: How to continue a line -- space_underscore
- From: strive4peace <strive4peace2006@xxxxxxxxx>
- Date: Wed, 24 Jan 2007 11:24:36 -0500
Hi Nancy,
if you are breaking a string, you will need & ... but if you are not, then you won't.
Here are some examples:
'~~~~~~~~~~~~
strSQL = "SELECT email " _
& " FROM [YourTablename] " _
& " WHERE conditions " _
& " ORDER BY somefieldname;"
'~~~~~~~~~~~~
& is used because the SQL statement is one string
'~~~~~~~~~~~~
Msgbox "This is a message" _
, _
, "Here is the title"
'~~~~~~~~~~~~
& is NOT used here because the different lines are used just to make the parameters easier to follow and there is nothing that needs to be concatenated (combined)
.... it just depends on what the statement is and where you break it
'~~~~~~~~~~~~
Msgbox "This line one of a message" _
& vbCrLf & " and line 2 of the message" _
& " because vbCrLf means to add a line break" _
, _
, "Here is the title"
'~~~~~~~~~~~~
when you do break lines, remember to add the necessary spaces! I like to put & at the beginning of a line if it needs it as well as start each literal string with a space if it is a continuation
Warm Regards,
Crystal
*
(: have an awesome day :)
*
MVP Access
Remote Programming and Training
strive4peace2006 at yahoo.com
*
Nancy wrote:
Thank you. Yes that is what I meant. I realized it wasn't very detailed, so I did another post. Actually, the other response said & _ (amersand, space, underscore).
I guess I will try bother.
- Follow-Ups:
- Re: How to continue a line -- space_underscore
- From: '69 Camaro
- Re: How to continue a line -- space_underscore
- References:
- Re: How to continue a line without letting it auto wrap
- From: strive4peace
- Re: How to continue a line without letting it auto wrap
- Prev by Date: Re: Emailing a Report -- balance Sub/End Sub, compile
- Next by Date: RE: Pass value into Query from Macro or Module
- Previous by thread: Re: How to continue a line without letting it auto wrap
- Next by thread: Re: How to continue a line -- space_underscore
- Index(es):
Relevant Pages
|
Loading