General information
Category:
Coding, syntax & commands
Title:
String question on search screen
Hello:
I'm working on a search screen that searches on various criteria
and I'm getting an error when someone enters in an apostraphe
in the surname i,e, O'leary
How can I force then either not to enter the apostraphe
or if they do give them an error message.
I'm using the following code:
str3=""
If not empty(this.value)
str3 = "upper(client.surname) like '" + allt(upper(this.value)) + "%'"
Endif
If left(str3,2) = "'"
=messagebox("you cannot enter an apostraphe, please enter the first letter of last name", 48, "CATS")
Any help would be appreciated.
Thank you.
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only