>I couldn't find the key codes for (') and ("), so I used the following code
>in the valid method of the textbox:
Just issue (from the command window) a simple?inkey(0)and type the apostrophe,
and then repeat it for the quote (quote is 34, AFAIK, and 39 is the
apostrophe).
>Local temptext
>
>temptext = occurs("'",this.value)
>
>if temptext>0
>=messagebox("This field cannot contain the (')
>character!",16,osys.Appname)
>this.value = ""
>thisform.refresh()
>ENDIF
>
>That takes care of the ('), but not the ("). Oh well, I'll stick with this
>for now unless someone knows where to find these key codes.
Sure it takes care, but also annoys the user, by deleting the original text
issued. Try this:
if temptext>0
this.value = chrtran(this.value, chr(34)+chr(39), "")
thisform.refresh()
wait "Apostrophes and quotes removed" window nowait
ENDIF