Stuart McLachlan
lexacorp at global.net.pg
Sun Apr 6 19:49:12 CDT 2003
Just noticed the Esc key requirement.
Add this to the previous:
Set Key Preview for the form ON
then
Private Sub Form_KeyPress(KeyAscii As Integer)
If KeyAscii = 27 Then
flgFinish = True
End If
End Sub
> > 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
....
> 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
--------------------------------------
This Email Was brought to you by
WebMail
A Netwin Web Based EMail Client
http://netwinsite.com/webmail/tag.htm