The pattern for this is usually something along the lines of:

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

finally
  Restore bookmark
  EnableControls
end

hth

On 6 March 2017 at 10:46, Marshland Engineering <[email protected]>
wrote:

> I have a form linked to a tbl. When I enter data into the form, there is
> one
> field that needs to be checked for duplicates.
>
> If I use a locate, I end up on the matching record and not on my current
> one.
>
> Basically I want to disable all tables and screen updates, do a search and
> if
> found, set a flag and in either case the return the to the original
> workspace.
>
> Any suggestions ?
>
> 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
>
>
>
_______________________________________________
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