Maybe '[' and ']' could help?
...
store " booked_to = [" + alltrim(thisform.hscmbstallions.value ) + "] and " to mbookedto
...
>Hello Everyone.
>
>Please, I need help with making a if, endif more generic.
>
>Is there some kind of statement I can use, maybe with the '%' that's used in select statements to make this work with any horse whose name contains an apostrophy.
>
>****begin if
>if thisform.hscmbstallions.value <> " "
> if alltrim(thisform.hscmbstallions.value) = "CAM'S CARD SHARK"
> store " booked_to = " + '"' + ("CAM'S CARD SHARK") +'"'+ " and " to mbookedto
> else
> store " booked_to = '" + alltrim(thisform.hscmbstallions.value ) + "' and " to mbookedto
> endif
>endif
>***end of endif
>
>TIA
>
>Jim Harvey
Alex