>DisableControls
>Get bookmark
>try
>  First
>  while not (duplicateFound or EOF) do
>  begin
>     duplicateFound := duplicate check(s)
>     Next
>  end
>
>finally
>  Restore bookmark
>  EnableControls
>end


Thanks the DisableControls is great. There are a lot of cross linked tables
and printing forms sometimes took a wile. Using this, it was so fast, I though
it had done nothing at all but it did. 

I used this for the duplicate search. 

     if (dm.tblMaster.Locate('RaceNo',eRaceNo.text,[loCaseInsensitive])) and 
(sMNZID <> dm.tblMasterMNZID.AsString) then begin

The second part is so that it does not find its own instance. 

Thanks Wallace.

_______________________________________________
NZ Borland Developers Group - Delphi mailing list
Post: [email protected]
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to [email protected] with 
Subject: unsubscribe

Reply via email to