[AccessD] Programmatically change cell formulae in Ecel

Arthur Fuller fuller.artful at gmail.com
Wed Nov 28 18:51:23 CST 2007


Patti,

Given SQL Server's "respect" for single quotes, here's another trick (which
you may already know). When accepting a name such as O'Connor, do a Replace
of single quote with a pair of single quotes. That gets the data in as you
wanted. I ran into this very often in an app a while ago, and eventually
wrote a function to deal with it:

Function sqTo2sq( ByRef str as String )
   If Instr( str, Chr(39) ) > 0 then
      sqTo2sq = Replace( str, Chr(39), (Chr(39) & Chr(39) )
   End If
End Function

I didn't copy and paste, so this is the gmail compiler at not work. But
that's a best guess.

Arthur

On 11/28/07, O'Connor, Patricia (OTDA) <Patricia.O'Connor at otda.state.ny.us>
wrote:
>
> Arthur
> Glad it worked !!  Will add it to the list of " you better remember"
> For me with a last name of O'Connor and dealing with many legacy systems I
> have learned to try almost anything to work around.
>
> Have a good evening
> Patti
>



More information about the AccessD mailing list