Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

The Dumbest Person Ever?

Status
Not open for further replies.

MrBelfry

IS-IT--Management
Joined
May 21, 2003
Messages
289
Am I the dumbest person ever?

I have some long sql statements in code which run off my screen causing me to scroll every time I want to check it or make changes.

There must be some way of wrapping the code without doing a tedious thing like 'string = string & "next part of string"'

Please help an idiot today

MrBelfry
 
AVeryLongString = "The first bit of the string " & _
"The second bit of the string " & _
"The third bit"

Use the underscore.
 
You are a genius!

Thanks
 
I like easy questions; No you're missing the title of dumbest person ever by miles. I've met several contenders for the title & I'm afraid that the fact you can ask a clear question puts you well out of the running!

Onto the 2nd question! you need to use an underscore for your line continuation character and an ampersand to concatenate the parts;

Code:
strSQL = "first part of string" & _
"second part of string"

make sure you keep the space in front of the underscore.

Hope that helps

Sharon
 
Hey Sharon

You are too kind!

MrBelfry
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top