Exclude a character (Apostrophe) in an input field of a form

Rich77

New member
Local time
Today, 15:13
Joined
Dec 26, 2023
Messages
9
In a form, an apostrophe may not be used in an input field (all other characters do not cause a problem). There are 2 options to solve this:
1. If the apostrophe is used, it will automatically be replaced by an underscore (with action "Replace").
2. If the apostrophe is used, a messagebox will warn you: "Apostrophe is not allowed" and you must first use another character.
I can't quite manage to implement either of these options without using a lot of VBA code.
Can anyone help me to solve this easily?
 
Answered in your duplicate post.
 
check for the instr() of the char() or chr() value
 

Users who are viewing this thread

Back
Top Bottom