Many thanks to all who responded with advice, including Dan Phillips, Paul Crisp, Jacques Paris and Keith Miller.
The General Consensus is that it is better to assign the whole command to a string variable and then use the run command to execute it. This allows use of the note or print statements to aid debugging. Spaces need to be inserted in the correct places to avoid the elements of the string blurring together e.g. dim SQL_Command as string SQL_Command="Select * From acqh Where Desc like "+chr$(34)+"%"+Acqh_Desc+"%"+chr$(34)+" Into Selection" run command SQL_Command chr$(34) is ASCII character code for " Many Thanks, Rob Brough The National Trust Cornwall Regional Office Lanhydrock Bodmin Cornwall UK. e-mail: [EMAIL PROTECTED] _______________________________________________________________________ List hosting provided by Directions Magazine | www.directionsmag.com | To unsubscribe, send e-mail to [EMAIL PROTECTED] and put "unsubscribe MapInfo-L" in the message body.
