[AccessD] Stop That Code!

Rocky Smolin - Beach Access Software bchacc at san.rr.com
Sun Apr 6 19:49:52 CDT 2003


Stuart:

Thanks. This will work like John's only without the tag property.  I've
never used Tag before.  Any advantage to either approach?

Rocky

----- Original Message -----
From: "Stuart McLachlan" <lexacorp at global.net.pg>
To: <accessd at databaseadvisors.com>
Sent: Sunday, April 06, 2003 5:31 PM
Subject: Re: [AccessD] Stop That Code!


> >
> > Dear List:
> >
> > I have some processes in an app which take a while to
> > execute.  I generally put something on the screen to show
> > the user that progress is being made. I'd like to give
> > them the capability to abort the process by pressing the
> > ESC key.  Maybe they used data selection criteria to
> > select 12 records and instead selected 12,000.  Or made a
> > mistake starting a long cost roll up or calculation which
> > they'd like to abort.
> > What's the simplest way to accomplish this?
> >
> DoEvents and a flag:
>
> As an example, put a text box (txtDisplay) and two buttons
> on a form and paste this into it:
>
> Option Compare Database
> Option Explicit
>
> Dim flgFinish As Boolean
>
> Private Sub Command0_Click()
> flgFinish = True
> End Sub
>
> Private Sub Command1_Click()
> Dim Counter As Long
> Do
>     Counter = Counter + 1
>     txtDisplay = Counter
>     DoEvents
> Loop Until flgFinish
> flgFinish = False
> End Sub
> --------------------------------------
>    This Email Was brought to you by
>                WebMail
>     A Netwin Web Based EMail Client
>   http://netwinsite.com/webmail/tag.htm
> _______________________________________________
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>




More information about the AccessD mailing list