Hola:
Prueba así:
Código Delphi
[-]
procedure TForm2.BitBtn2Click(Sender: TObject);
begin
If (DBEdit1.text <> '') and (DBEdit2.text <> '') then
begin
With DataModule7.Table1 Do
Begin
Try
Insert;
Post;
Except
Application.MessageBox ('El nombre introducido no es correcto'+chr(13)+
'El nombre esta repetido, prueba con otro',
'Insertar registro',
Mb_Ok+Mb_IconStop);
Cancel;
Insert;
End;
End;
end
else
ShowMessage ('¡Debe rellenar todos los campos!')
end;
end.
Tenías unos parentesis demás..
