Solved

Cannot stop code with tight loop using ctrl-break

Posted on 2008-10-06
4
257 Views
Last Modified: 2013-11-27
I  cannot get code with a tight loop (series of ADODB commands) to stop when I hit ctrl-break unless I put in a DoEvents statement to execute every 100 iterations of the loop. When the code does stop it is always on the DoEvents statement and the CPU is still running at 100% and I cannot step forward from the DoEvents statement, only continue execution with F5. Any ideas on how to be able to stop code in tight loops using ctrl-break and be able to step forward fronm the stopping point?
0
Comment
Question by:SimonKravis
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 22655574
are you using a counter ?

try using

if counter=100 then stop
0
 

Author Comment

by:SimonKravis
ID: 22655602
I need the flexibility of using a user-initiated action rather than satisfacyion of a preset condition, which will certainly work.
0
 
LVL 26

Accepted Solution

by:
dannywareham earned 500 total points
ID: 22655623
0
 
LVL 26

Expert Comment

by:dannywareham
ID: 22655874
Glad to help :-)
0

Featured Post

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question