Solved

Access VBA pauses at a line that used to have a breakpoint

Posted on 2012-04-03
9
559 Views
Last Modified: 2012-04-04
Access VBA pauses at a line that used to have a breakpoint.  The line turns yellow, but there's no red indicating a breakpoint.  When I click the "run" arrow, it continues.

I've cleared all breakpoints.  I also made a copy, and that does it, too.  How do I make it stop stopping?
0
Comment
Question by:Barry Sweezey
  • 3
  • 2
  • 2
  • +2
9 Comments
 
LVL 47

Expert Comment

by:Dale Fye (Access MVP)
Comment Utility
1. back up

2. After clearing all breakpoints, try a compact and repair.

3. It that still doesn't work, try decompiling and recompiling the database.  I usually do this via a batch file on my desktop (do it once or twice a week for the app I'm working on at the time).

"C:\Program Files\Microsoft Office\Office12\MSACCESS.EXE" "C:\Users\xxx.yyy\Documents\Work\Access\myDb.accdb" /decompile

The stuff in the first set of quotes is the full path and filename where your version of Access resides (probably not Office12 from your post).  The second is the full path and filename of your database file.

Then do another compact/repair operation and then recompile.
0
 
LVL 61

Accepted Solution

by:
mbizup earned 250 total points
Comment Utility
Try cutting the offending line and pasting it back to the same place.

I've seen breakpoints refuse to clear occasionally - not sure what causes it, but deleting/reentering the line seems to do the trick for me.
0
 
LVL 57

Assisted Solution

by:Jim Dettman (Microsoft MVP/ EE MVE)
Jim Dettman (Microsoft MVP/ EE MVE) earned 250 total points
Comment Utility
VBA is notorious for phantom breakpoints.  Copy the line to notepade, delete it.  Do a compile.  Close and then compact and repair the DB, then re-open and paste the line back in.  Then compile and save.

 That usually gets rid of it.

Jim.
0
 
LVL 57

Expert Comment

by:Jim Dettman (Microsoft MVP/ EE MVE)
Comment Utility
BTW, sometimes just adding a line or two, then doing a clear all breakpoints will take care of it to.

Jim.
0
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

 
LVL 75

Expert Comment

by:DatabaseMX (Joe Anderson - Access MVP)
Comment Utility
Believe it or not ...  Reboot your system ... done. Gone.

mx
0
 
LVL 47

Expert Comment

by:Dale Fye (Access MVP)
Comment Utility
A little extreme, don't you think, Joe?
0
 
LVL 57

Expert Comment

by:Jim Dettman (Microsoft MVP/ EE MVE)
Comment Utility
<<A little extreme, don't you think, Joe?>>

  Maybe, but from where I sit, Windows needs a reboot as soon as it gets started....

 Actually I'll take that back...Windows 7 is a lot more stable then past versions were and it seems pretty solid even without reboots.

 Interesting though that a reboot would take care of it.  Never knew that.

Jim.
0
 
LVL 75

Expert Comment

by:DatabaseMX (Joe Anderson - Access MVP)
Comment Utility
"A little extreme, don't you think, Joe?"

Nooooo ... because that's what it takes.

mx
0
 

Author Closing Comment

by:Barry Sweezey
Comment Utility
I deleted the line, compiled, reinserted the line, and compiled again.  It runs without stopping now.  Thanks!
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

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…
Introduction When developing Access applications, often we need to know whether an object exists.  This article presents a quick and reliable routine to determine if an object exists without that object being opened. If you wanted to inspect/ite…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.

762 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

9 Experts available now in Live!

Get 1:1 Help Now