Results 1 to 3 of 3

Thread: Stop a process

  1. #1
    Guest
    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.

  2. #2
    Guest
    Try:

    Code:
    Do
    DoEvents
    Loop

  3. #3
    Guest
    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
  •  



Click Here to Expand Forum to Full Width