Hello,
I have a text box where I enter a name.
I want to restrict the users from using a ' symbol or " symbol or any other special charecter in that text box.
How can I achieve it?
its access FE and BE.
Thanks
Shaq
4 10084
This may be a too simplistic answer, but why can't you use an input mask and only allow normal A-Z and a-z characters?
Hello,
I have a text box where I enter a name.
I want to restrict the users from using a ' symbol or " symbol or any other special charecter in that text box.
How can I achieve it?
its access FE and BE.
Thanks
Shaq
If you want to allow only Alpha, Numeric, or AlphaNumeric characters, use an Input Mask as indicated by Zwoker. If you wish to disallow specific characters, you can trap the Keystrokes in the Control's KeyPress() Event. As an example, the following code will not allow a ', ", ?, or @ character in an Invoice Number Field: -
Private Sub txtInvoice_KeyPress(KeyAscii As Integer)
-
Select Case KeyAscii
-
'do not allow a ', ", ?, or @ in the Text Box
-
Case Asc("'"), Asc(""""), Asc("?"), Asc("@")
-
KeyAscii = 0 'Cancel the Keystroke
-
Case Else
-
'allow Keystroke to be processed
-
End Select
-
End Sub
Hey,
Thanks a lot... that worked exactly the way i wanted it.
I have another post in this forum which was not answered yet.
"Excel report using old version of MS excel"
If you have a chance then pls look at it.
Thanks again.
Shaq
Hey,
Thanks a lot... that worked exactly the way i wanted it.
I have another post in this forum which was not answered yet.
"Excel report using old version of MS excel"
If you have a chance then pls look at it.
Thanks again.
Shaq
You are quite welcome, when I get a chance I'll have a look.
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Desmond |
last post by:
Can anyone tell me ho to get certain charecters to be displayed.
When sending email with (') i get (\) instead. i.e.
This dosen't work becomes dosen\t
Is there some kind of escape key to get...
|
by: Paul |
last post by:
Hi all, at present I I've built a website which can be updated by admin and
users.
My problem, I've combined "log in" and "access levels" to restrict access to
certain pages, using the built...
|
by: Mindy Geac |
last post by:
Is it possible to delete special caracters from a string and multiple
spaces?
When the input is : "a&*bbb cc/c d!d"
I want the result : "abbb ccc dd"
thnx.
MJ
<?php
|
by: gc |
last post by:
Hi,
What is the purpose of the restrict keyword?
gc
|
by: Alex Smith |
last post by:
Hi friends,
I want to read all charecters of pdf file using char array.
Thanks,
Alex.
|
by: pemo |
last post by:
In Harbison and Steele's book, they say that using 'restrict' allows
functions like memcpy() to be prototyped like this:
void * memcpy(void * restrict s1, const void * restrict s2, size_t n);
...
|
by: Niu Xiao |
last post by:
I see a lot of use in function declarations, such as
size_t fread(void* restrict ptr, size_t size, size_t nobj, FILE*
restrict fp);
but what does the keyword 'restrict' mean? there is no...
|
by: Ken Camann |
last post by:
Hello!
I am having trouble understanding certain aspects of restrict
qualified pointers. I understand what they are in the simplest terms,
but I want to get high performance and portability out...
|
by: copx |
last post by:
Restrict keyword questions
How far does the guarantee that an object is not accessed through another
pointer go? I mean, all examples I have seen are simple stuff like:
int f (int *restrict x,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
| |