Topic: ID code
Hi
Is there a scrip that a textbox should only consist of 10 digits and if you insert more or less than 10 digits, it shows an error?
What I want to do is to record personnel number for each employee
thanks
My Visual Database → Script → ID code
Hi
Is there a scrip that a textbox should only consist of 10 digits and if you insert more or less than 10 digits, it shows an error?
What I want to do is to record personnel number for each employee
thanks
You could do something like this.
Procedure something;
var
lngth : integer;
begin
lngth := Length(Form1.Edit1.text); //check how many digits have been entered
if lngth <> 10 then
begin
messageDlg('Personnel Number must be 10 digits ',mtError, mbCancel, 0); //your choice of message and buttons
Form1.Edit1.SetFocus; // Make the edit box the focus - so the correct number can be typed in
end;
thanks for your fast reply
unfortunately I got error for this script.
can you please attach a sample?
Hi Identity, Hi CDB,
Another approach you could try is to disable the 'save' button until the personnel no' is the correct length (see attached).
Derek.
Интересное решение. То есть если использовать данный скрипт и Exel не нужен? Или данный скрипт для Exel предназначен.
Интересное решение. То есть если использовать данный скрипт и Exel не нужен? Или данный скрипт для Exel предназначен.
Интересное решение - это писать вопросы на русском языке в англоязычной ветке форума, толком даже не разобравшись в сути топика и тематике форума
The script is intended to be used inside My Visual Database.
Интересное решение - это писать вопросы на русском языке в англоязычной ветке форума, толком даже не разобравшись в сути топика и тематике форума
Это говнобот же... В анкете так и написано.
I got error for this script.
What error did you get? There should be an extra END; at the bottom of the script, which I didn't put in.
My Visual Database → Script → ID code
Powered by PunBB, supported by Informer Technologies, Inc.
Theme Hydrogen by Kushi