View Full Version : Long Statement


Maki71
03-08-2008, 02:08 PM
Hi,

I got a very long statement and it does not fit into 1 line of code. How do I concatenate both lines?

........PS_Price_Key = '" & ccRS.Fields(32).Value & "', (line 1)
@PS_Total_Discount = '" & ccRS.Fields(22).Value & "'............. (line 2)

Thanks,

Mark

RuralGuy
03-08-2008, 02:43 PM
The underscore "_" is the line continuation in VBA. Depending on the situation you may want a leading space " _" and maybe a contcantenation character as well "& _". BTW, you may also want to review some of these links:
List of reserved words in Access 2002 and Access 2003 (http://support.microsoft.com/?id=286335)
List of Microsoft Jet 4.0 reserved words (http://support.microsoft.com/?id=321266)
Special characters that you must avoid when you work with Access databases (http://support.microsoft.com/?id=826763)

Maki71
03-08-2008, 10:58 PM
Thank you :-)

RuralGuy
03-09-2008, 09:54 AM
You are welcome.