Works in Delphi.... lazarus / 31-LCL ---------------------------------------------------------------------- james · 2011-02-08 16:53 This doesn't work in Lazarus.  Am I missing maybe needing to add a unit? procedure TForm3.Edit2Change(Sender: TObject); begin  (this part here -->) if Key in ['0'..'9','A'..'Z','a'..'z'] then  begin  Exit;  end else ShowMessage('You may use ONLY a combination of: a-z, A-Z, 0-9') Key:=#0; end; ---------------------------------------------------------------------- typo · 2011-02-08 17:01 Because "Key" is unknown. You need to put this on an OnKey event handler where Key is a parameter. ---------------------------------------------------------------------- james · 2011-02-08 17:14 Thanks.  OnKeyPress to be exact.