Step Into to debug does not work (1 Viewer)

warwica

New member
Local time
Today, 18:20
Joined
Sep 3, 2002
Messages
6
I have a database that I created a while ago but for some reason when I try to run through code in step mode it does not work. Instead the entire code runs as if I'd hit Run. Also, although I can set break points in the code they are ignored and the code again just runs straight through.

I am now trying to make and tests some changes to the db but this is making it nigh on impossible!

Has anyone else come across this and if so what's the solution?
 

gemma-the-husky

Super Moderator
Staff member
Local time
Today, 18:20
Joined
Sep 12, 2006
Messages
15,655
are you sure the code is reaching the breakpoints?

i can't see any other reason for it not to respect the breakpoints
 

RuralGuy

AWF VIP
Local time
Today, 11:20
Joined
Jul 2, 2005
Messages
13,826
Any chance you have a Timer event happening? That can cause some strange results such as you have described.
 

warwica

New member
Local time
Today, 18:20
Joined
Sep 3, 2002
Messages
6
Yes the code is reaching the breakpoint. If I set a breakpoint before e.g. a message box statement it runs past the breakpoint and puts up the dialog box from the message box statement.

There are no Timer events running.

I do have a class module that I imported that runs a pop up calendar from a button on a form.
 

MsfStl

Registered User.
Local time
Today, 12:20
Joined
Aug 31, 2004
Messages
74
I am running into this same problem. I am modifying a program and want to test a control. The code runs through, ignoring the breakpoints. What may be causing this?
 

MsfStl

Registered User.
Local time
Today, 12:20
Joined
Aug 31, 2004
Messages
74
Ok, I
1) Added the code:
DoCmd.SetWarnings (-1)
Which turns the SetWarnings properties on.
2) Checked the Tools/Startup checkbox "Allow Special Keys"
3) Closed the program and restarted

One of those worked. But, I am unsure what I did for the program to run through the breakpoints in the first place. Does anyone have an idea as to what may have been the cause of the code running through the breakpoints? Fixing the problem the way I did resolves the issue, but it won't prevent me from making the mistake again, because I don't know what I did wrong in the first place.

Thanks for your time.

Scot
 

boblarson

Smeghead
Local time
Today, 10:20
Joined
Jan 12, 2001
Messages
32,059
It's possible you accidentally set yourself without warnings. I know I've been burned in the past by using DoCmd.SetWarnings False and then I didn't have the code to set it true in the error handler so that if it failed before getting to the part where it reset the warnings, I would then end up without any.

That's the one I would think would be the most likely.
 

RuralGuy

AWF VIP
Local time
Today, 11:20
Joined
Jul 2, 2005
Messages
13,826
Scot,
I think it was this one:
2) Checked the Tools/Startup checkbox "Allow Special Keys"
 

boblarson

Smeghead
Local time
Today, 10:20
Joined
Jan 12, 2001
Messages
32,059
Scot,
I think it was this one:
2) Checked the Tools/Startup checkbox "Allow Special Keys"

Yes, you are correct:

 

MsfStl

Registered User.
Local time
Today, 12:20
Joined
Aug 31, 2004
Messages
74
Yeah, I had clicked off everything on the original DB in the StartUp once I passed it on to the user (prevents them from getting inside, since they don't know the "Control" Key at startup) and now I am modifying a copy as a template for another project. It was driving me bananas trying to test my code, because I couldn't walk through it. Thanks guys. Learn something everyday!

Scot
 

Users who are viewing this thread

Top Bottom