PC Review


Reply
Thread Tools Rate Thread

Acts like there's a "Break" in code when there isn't

 
 
Michael
Guest
Posts: n/a
 
      5th Jan 2010
Hi -

I have an Access 2003 application I developed that I've been using for
probably 1 year without any problems. I recently modified the code that was
executed when one of the command buttons is clicked. While doing the
modifications, I inserted a break and stepped through the code several times
to find a problem I was having. Now I have removed the break, but when I
click the button VBA opens up and the code stops until I hit play or step
through it. Also, I can close the code and hit the command button again and
it will run without stopping. The problem has carried over to a few of the
other buttons as well even though I haven't modified their code at all.

Anyone have any thoughts what might be happening and how to stop it? The
application works fine, but its confusing some of our users when they see all
the VBA code pop up on their screen.

Thanks!
 
Reply With Quote
 
 
 
 
Banana
Guest
Posts: n/a
 
      5th Jan 2010
We've all been bit by 'phantom breakpoint'.

A quick fix: Copy the line where the code breaks at, let the code run to
completion, then delete that line & the surrounding line (not strictly
necessary but to be safe) then paste that code back into. That will
usually clear up the phantom breakpoint.

On prevention side, try to avoid editing the line where there is a
breakpoint or saving the file with breakpoint left in. Some also
suggests not editing the code while it is running.

HTH.

Michael wrote:
> Hi -
>
> I have an Access 2003 application I developed that I've been using for
> probably 1 year without any problems. I recently modified the code that was
> executed when one of the command buttons is clicked. While doing the
> modifications, I inserted a break and stepped through the code several times
> to find a problem I was having. Now I have removed the break, but when I
> click the button VBA opens up and the code stops until I hit play or step
> through it. Also, I can close the code and hit the command button again and
> it will run without stopping. The problem has carried over to a few of the
> other buttons as well even though I haven't modified their code at all.
>
> Anyone have any thoughts what might be happening and how to stop it? The
> application works fine, but its confusing some of our users when they see all
> the VBA code pop up on their screen.
>
> Thanks!

 
Reply With Quote
 
David C. Holley
Guest
Posts: n/a
 
      5th Jan 2010
I've also gone back and reset the breakpoint then let the code run to the
break point, having it stop and then continuing. Then clearing it and
Debugging.

The STOP keyword is a viable alternative.

"Banana" <Banana@Republic> wrote in message
news:4B43882F.9090309@Republic...
> We've all been bit by 'phantom breakpoint'.
>
> A quick fix: Copy the line where the code breaks at, let the code run to
> completion, then delete that line & the surrounding line (not strictly
> necessary but to be safe) then paste that code back into. That will
> usually clear up the phantom breakpoint.
>
> On prevention side, try to avoid editing the line where there is a
> breakpoint or saving the file with breakpoint left in. Some also suggests
> not editing the code while it is running.
>
> HTH.
>
> Michael wrote:
>> Hi - I have an Access 2003 application I developed that I've been using
>> for probably 1 year without any problems. I recently modified the code
>> that was executed when one of the command buttons is clicked. While
>> doing the modifications, I inserted a break and stepped through the code
>> several times to find a problem I was having. Now I have removed the
>> break, but when I click the button VBA opens up and the code stops until
>> I hit play or step through it. Also, I can close the code and hit the
>> command button again and it will run without stopping. The problem has
>> carried over to a few of the other buttons as well even though I haven't
>> modified their code at all.
>>
>> Anyone have any thoughts what might be happening and how to stop it? The
>> application works fine, but its confusing some of our users when they see
>> all the VBA code pop up on their screen.
>>
>> Thanks!



 
Reply With Quote
 
Allen Browne
Guest
Posts: n/a
 
      6th Jan 2010
A decompile will usually solve this problem.

Details of steps to recover a problem database:
http://allenbrowne.com/recover.html

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.


"David C. Holley" <David.C.Holley> wrote in message
news:(E-Mail Removed)...
> I've also gone back and reset the breakpoint then let the code run to the
> break point, having it stop and then continuing. Then clearing it and
> Debugging.
>
> The STOP keyword is a viable alternative.
>
> "Banana" <Banana@Republic> wrote in message
> news:4B43882F.9090309@Republic...
>> We've all been bit by 'phantom breakpoint'.
>>
>> A quick fix: Copy the line where the code breaks at, let the code run to
>> completion, then delete that line & the surrounding line (not strictly
>> necessary but to be safe) then paste that code back into. That will
>> usually clear up the phantom breakpoint.
>>
>> On prevention side, try to avoid editing the line where there is a
>> breakpoint or saving the file with breakpoint left in. Some also suggests
>> not editing the code while it is running.
>>
>> HTH.
>>
>> Michael wrote:
>>> Hi - I have an Access 2003 application I developed that I've been using
>>> for probably 1 year without any problems. I recently modified the code
>>> that was executed when one of the command buttons is clicked. While
>>> doing the modifications, I inserted a break and stepped through the code
>>> several times to find a problem I was having. Now I have removed the
>>> break, but when I click the button VBA opens up and the code stops until
>>> I hit play or step through it. Also, I can close the code and hit the
>>> command button again and it will run without stopping. The problem has
>>> carried over to a few of the other buttons as well even though I haven't
>>> modified their code at all.
>>>
>>> Anyone have any thoughts what might be happening and how to stop it?
>>> The application works fine, but its confusing some of our users when
>>> they see all the VBA code pop up on their screen.
>>>
>>> Thanks!

>
>

 
Reply With Quote
 
Michael
Guest
Posts: n/a
 
      6th Jan 2010
Thanks so much!! Deleting the code line like Banana suggested fixed the
problem!

"Allen Browne" wrote:

> A decompile will usually solve this problem.
>
> Details of steps to recover a problem database:
> http://allenbrowne.com/recover.html
>
> --
> Allen Browne - Microsoft MVP. Perth, Western Australia
> Tips for Access users - http://allenbrowne.com/tips.html
> Reply to group, rather than allenbrowne at mvps dot org.
>
>
> "David C. Holley" <David.C.Holley> wrote in message
> news:(E-Mail Removed)...
> > I've also gone back and reset the breakpoint then let the code run to the
> > break point, having it stop and then continuing. Then clearing it and
> > Debugging.
> >
> > The STOP keyword is a viable alternative.
> >
> > "Banana" <Banana@Republic> wrote in message
> > news:4B43882F.9090309@Republic...
> >> We've all been bit by 'phantom breakpoint'.
> >>
> >> A quick fix: Copy the line where the code breaks at, let the code run to
> >> completion, then delete that line & the surrounding line (not strictly
> >> necessary but to be safe) then paste that code back into. That will
> >> usually clear up the phantom breakpoint.
> >>
> >> On prevention side, try to avoid editing the line where there is a
> >> breakpoint or saving the file with breakpoint left in. Some also suggests
> >> not editing the code while it is running.
> >>
> >> HTH.
> >>
> >> Michael wrote:
> >>> Hi - I have an Access 2003 application I developed that I've been using
> >>> for probably 1 year without any problems. I recently modified the code
> >>> that was executed when one of the command buttons is clicked. While
> >>> doing the modifications, I inserted a break and stepped through the code
> >>> several times to find a problem I was having. Now I have removed the
> >>> break, but when I click the button VBA opens up and the code stops until
> >>> I hit play or step through it. Also, I can close the code and hit the
> >>> command button again and it will run without stopping. The problem has
> >>> carried over to a few of the other buttons as well even though I haven't
> >>> modified their code at all.
> >>>
> >>> Anyone have any thoughts what might be happening and how to stop it?
> >>> The application works fine, but its confusing some of our users when
> >>> they see all the VBA code pop up on their screen.
> >>>
> >>> Thanks!

> >
> >

> .
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Field Names: "LongName", "ShortName", "Code", "Description","Comments" PeteCresswell Microsoft Access 2 25th Feb 2009 11:41 PM
Error Message: "Can't Execute Code in Break Mode" cru Microsoft Excel Programming 6 21st Nov 2008 11:41 PM
OnTime code error "can't execute code in break mode" tskogstrom Microsoft Excel Programming 1 8th Sep 2006 10:29 AM
"This action will reset the current code in break mode" =?Utf-8?B?c2N1YmFkaXZlcg==?= Microsoft Access 2 23rd Aug 2006 12:15 PM
error msg. "This action will reset the current code in break mode" =?Utf-8?B?QWxleA==?= Microsoft Access Queries 1 18th Nov 2004 04:13 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:02 PM.