Topic: How to customize a field English alphabets only.

First of all sorry for my bad English.
I search nearby all forums to find my problem solution, but I failled,
At last I find this topic close to my problem due to "TEXT" word.
My problem is that, I have create a Table and then create Costumer name field, define field is "TEXT" field, but during filling us this field allow me to put
number, special characters etc too.
I want to put in the name field only "ENGLISH ALPHABETS" Like Aa----Zz only, not number nor any thing else. Please help me to solving my problem ASAP.

Thanks in Advance.

Re: How to customize a field English alphabets only.

Hello.


You can do it using script for TextBox component

procedure Form1_Edit1_OnKeyPress (Sender: TObject; var Key: Char);
begin
    If not ((Key in ['a'..'z']) or (Key in ['A'..'Z']))  then Key:=#0;
end;
Dmitry.

Re: How to customize a field English alphabets only.

Hello Ahmadrazaullah,
Defining a field as 'text' doesn't prevent non alpha characters from being entered, it just means that numbers are also treated as text.
To prevent numbers from being entered DURING input, I would use a small script (please see attached).
You could also check for it when saving the form or when leaving the field - it really depends on what suits your application best.
Regards,
Derek.

Post's attachments

Attachment icon alphas.zip 334.65 kb, 349 downloads since 2018-04-20 

Re: How to customize a field English alphabets only.

Sorry Dmitry - didn't see you'd already replied with the same solution..
Derek.

Re: How to customize a field English alphabets only.

OMG,Thanks to all you save my life and I was stuck in my project.
My project success dedicated to all MVD team.
thanks again.
love to all.

Re: How to customize a field English alphabets only.

Ahmadrazaullah wrote:

Stuck Again after making my DB to next step.
Please check my DB, Not working in complicated level.

Unfortunately I can't help you, because you use pirate version.

Dmitry.

Re: How to customize a field English alphabets only.

Thanks for your reply, Sorry But I find my Solution.hanks for Your help. I am not using pirate software, I am using setup 4.4 beta, download from your site.