Hello there Hello there if the customer code is empty in the transaction number where the customer code and transaction number are in accordance with the business rule, we want to send a message and enter the related field. However, when we write the code in the onexit field in the transaction number field, the cursor is not the focus on the customer number. We do not have a problem when we want to do the same control at the button. procedure TForm1.Edit2Exit(Sender: TObject);
begin
if CustomerCode.Text = '' then
begin
ShowMessage('Error !!! Customer Code is null');
CustomerCode.SetFocus;
Abort;
end;
end;