Stuart McLachlan
stuart at lexacorp.com.pg
Sat May 12 15:56:43 CDT 2007
You can also enhance these to "double escape" any embedded quotes: Function qq( s a String) s = Replace(s,Chr$(34),Chr$(34) & Chr$(34)) qq = Chr(34) & s & Chr(34) End Function Function q( s As String) s = Replace(s,Chr$(39),Chr$(39) & Chr$(39)) q = Chr(39) & s & Chr(39) End Function On 12 May 2007 at 16:42, Arthur Fuller wrote: > My preferred choice is a pair of functions called q() and qq(), which accept > a string and return the string encapsulated in either single or double > quotes. > > Function q( s As String) > q = Chr(39) & s & Chr(39) > End Function > > Function qq( s a String ) > qq = Chr(34) & s & Chr(34) > End Function > > Arthur > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com -- Stuart