[DUG] Delphi Digest, Vol 160, Issue 1
Marshland Engineering
marshland at marshland.co.nz
Mon Mar 6 12:32:19 NZDT 2017
>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.
More information about the Delphi
mailing list