> >&&llCree is a form-level public variable indicating that the user is creating a new record... >IF NOT llCree > IF LASTKEY() = 27 >&&traps 'escape' key to be able to proceed with the cancel property of my quit button > RETURN .T. > ELSE > IF EMPTY(this.Value) &&no username specified > mssErr("Veuillez indiquer l'identificateur de l'usager.") > RETURN .F. > ELSE > lcAlias = ALIAS() > USE usagers AGAIN ALIAS us IN 995 > SELECT us > COUNT FOR ALLTRIM(id_user) = ALLTRIM(this.Value) TO liResul > USE IN 995 > SELECT &lcAlias > IF liResul > 0 > mssErr("Cet identificateur est déjà utilisé par un autre usager, veuillez en choisir un autre.") > RETURN .F. > ELSE > RETURN .T. > ENDIF > ENDIF > ENDIF >ELSE >>that code is in the valid event of txtID_user.