Topic: Form validations
Hello guys, i need some help.
I have 2 questions.
1st - I have a form that i can add clients, i have some textbox where i can put name, age, etc.
When i find the clients and open the form "edit" the texboxes are filled with the name of the selected client.
When i open the form add a new client the textboxes are filled with the name of the client i eddit.
There is a way to force them to be cleared?
2nd - The form addClient i can text some data, like name, age, etc. but i want some fields not null i have a piece of code but is not working...
What am i doing wrong ??
procedure frmNewClient_Button2_OnClick (Sender: string; var Cancel: boolean);
begin
if (frmNewClient.cboxNome.Text = "" )then
MessageDlg('O campo "Nome" é obrigatório.',mtError,mbOK,0);
Cancel := True;
end;
end;
I would appreciate some help