Apostrophe

fernin8r

Registered User.
Local time
Today, 13:08
Joined
May 28, 2002
Messages
142
I have a slight problem with the apostrophe. The user is to input a Project Number when creating a new project. This Project Number is used as a reference or link to many different things throught the database.

The problem occurs when the user inputs an apostrophe somewhere. I think it messes up my code because it acts as a comment mark.

MY QUESTION: Is there a way to detect an apostrophe within a Text Box so that i can notify the user that he/ she can't use an apostrophe?

Thanks
 
Amongst others, try this:

Open the form in design mode.
Define this Validation Rule for your textbox:

Not Like "*'*"

Define a Validation Text

HTH,

RV
 
or you could find the keyascii code for the apostrophe, so when pressed it brings up a msgbox??
 
>or you could find the keyascii code for the apostrophe<

Which is 39, so you could use Chr(39)

RV
 

Users who are viewing this thread

Back
Top Bottom