Solved

Cannot stop code with tight loop using ctrl-break

Posted on 2008-10-06
4
252 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

911 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

21 Experts available now in Live!

Get 1:1 Help Now