Crie uma tabela com campos senha e nome e use o código a seguir: If not dmDados.Senhas.Locate('Usuario',EdtNome.Text,[LoCaseInsensitive])Then begin MessageBox (handle,'Usuário não confere!','Atenção',mb_IconExclamation +mb_ok); EdtNome.Text := ''; EdtNome.SetFocus; end else If not dmDados.Senhas.Locate('Senha',EdtSenha.Text,[LoCaseInsensitive])Then begin MessageBox (handle,'Senha não confere!','Atenção',mb_IconExclamation +mb_ok); EdtSenha.Text := ''; EdtSenha.SetFocus; end else begin Usu := EdtNome.Text; FrmSenha.Visible := False; FrmPrincipal.Enabled := True;; FrmSenha.Close; FrmAbertura.Close; end; end;