Solved

Cannot stop code with tight loop using ctrl-break

Posted on 2008-10-06
4
251 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
  • 2
4 Comments
 
LVL 119

Expert Comment

by:Rey Obrero
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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

The first two articles in this short series — Using a Criteria Form to Filter Records (http://www.experts-exchange.com/A_6069.html) and Building a Custom Filter (http://www.experts-exchange.com/A_6070.html) — discuss in some detail how a form can be…
I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

706 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now