Hola.
Se ocurrió algo que quizá te pueda aportar una idea:
Código Delphi
[-]
procedure TFrmSuplidor.SuplidorGuardarClick(Sender: TObject);
var
Msg: string;
TC: TWinControl;
begin
Msg:= '';
if DatoExiste('Telefono',METelefono.Text) then
begin
Msg:= Msg + 'Telefono Existe, ';
TC:= METelefono;
end;
if DatoExiste('Suplidor',EDSuplidor.Text) then
begin
Msg:= Msg + 'Suplidor Existe, ';
TC:= EDSuplidor;
end;
if DatoExiste('RNC',MERnc.Text) then
begin
Msg:= Msg + 'RNC Existe, ';
TC:= MERnc;
end;
if Msg = '' then
else
begin
ShowMessage(Msg+ ' Ingrese nuevamente');
TC.SetFocus;
end;
end;
Te mostrará un sólo mensaje y como son evaluados en órden inverso a su
Tab Order, el SetFocus te posicionará en el primer campo duplicado.
Como sugerencia, sacar con el
Input Mask Editor la opción
Save Literal Characters ( en vez de borrar la máscara por código ) va a hacer tu código más simple.
Saludos.
