|
-
Aug 12th, 2000, 12:08 AM
#1
How can I stop or cancel a process. Let say deleting a group of records in an Access table and I would like to have a CANCEL button on a dialog box for user to stop or cancel this process. Could anyone shows me how you could accomplished this? Thanks.
-
Aug 12th, 2000, 12:51 AM
#2
-
Aug 12th, 2000, 06:14 AM
#3
Code:
Dim KeepGoing as boolean
KeepGoing = true
'main process
Do While KeepGoing = true
'do your stuff here
DoEvents
loop
'put this in a button's event:
KeepGoing = false
as long as the KeepGoing variable is true, then the loop continues until finished.
KeepGoing is sometimes known as a "Flag" value.
DoEvents, simply pauses the loop and checks if anythink has happened to the program, like a user clicks a button, or a form is minimised etc...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|