You'll need to put ending quotation marks at the end of the line, then use the underscore character to tell VBA you're moving to a new line. You'll need to use an anpersand to concatenate the multiple strings... like this:Obviously that uses multiple lines in the VB editor but i cant figure out how to add separators so that it will treated as one line even though it is multiple lines. any ideas?
[vba]"SELECT WAH.* FROM WAH WHERE (((WAH.[Final DX1]) Between " _
& "'42' And '42.99')) OR (((WAH.[Final DX1]) Between '140' And '239.99')) " _
& "OR (((WAH.[Final DX1]) Between '249' And '249.99')) OR (((WAH.[Final " _
& "DX1]) Between '250' And '250.99')) OR (((WAH.[Final DX1]) Between " _
& "'277.30' And '277.39')) OR (((WAH.[Final DX1]) Between '278.01' And " _
& "'278.01')) OR (((WAH.[Final DX1]) Between '282.62' And '282.69')) OR " _
& "(((WAH.[Final DX1]) Between '295' And '300.99')) OR (((WAH.[Final " _
& "DX1]) Between '318' And '319')) OR (((WAH.[Final DX1]) Between '330' " _
& "And '337.99')) OR (((WAH.[Final DX1]) Between '340' And '349.99')) OR " _
& "(((WAH.[Final DX1]) Between '357.00' And '357.99')) OR (((WAH.[Final " _
& " ,etc."[/vba]
obviously, you'll probably want to make your splits in places that make sense, instead of randomly like I did above.
HTH![]()