Access XP Debugging

RGALLEN

Registered User.
Local time
Today, 00:30
Joined
Apr 30, 2001
Messages
18
I have an Access 97 application that I converted to Access XP (2002). I am unable to use the "Step Into" option under debug to step thru the code or press F8 to enter the debugging mode. If I select the "Step Into" from the Debug menu option or F8 on my keyboard nothing happens. If I place a "Stop" within the code and then select the Run Sub/UserForm then it opens the "Macros" form within Access but does not allow me to walk through the code at all.

Does anyone have an answer for me? I would greatly appreciate it. Thanks... :confused:
 
:rolleyes: Hello RGALLEN!
You have to put a Breakpoint in VBA.
Open VBA, put the cursor on VBA line, click
on DEBUG icon, click "Toggle Breakpoint", or
simpler click left of VBA line on a vertically
gray bar.
 
Debugging in Access 2002, I think is a bit different than 97.

You're not allowed to run subs in form/report modules from VBE, but have to trigger them from the form/report, and subs taking parameters, you need to fire of in similar manner too.

But the Stop statement, or setting a breakpoint, should allow you to step through after you've fired off such routine, for instance from a form. If not, could it be that you've altered some of the properties of the db?

I think particularly of the AllowSpecialKeys and AllowBreakIntoCode properties (I think they need to be set in conjunction with eachother)
Code:
im db As Database
Set db = CurrentDb

with db
     .Properties("AllowSpecialKeys") = true  
     .Properties("AllowBreakIntoCode") = true
end with
 
:) RoyVidar is in right.
Click on Tools, click Startup and check
"Use Access Special keys", select it if it is not
selected, then close your APP and Reopen it and
now put a BEREAKPOINT on line in VBA.
 
MStef & RoyVidar thank for the suggestions.

I went to Tools then Startup and checked the box to activate the "Use Access Special Keys" and then closed the "mdb". I then re-opened it and set a break point within the VB code, but I still couldn't get the "F8" or "Step Into" function to work. One of my users of the application is receiving an error when they attempt to print/save a record that states the following:

In the header it just says "Microsoft Access" and in the description it just gives me a number "13".

I am just trying to set a break point so that when I walk through the application the way the user does I can recreate the error and be able to fix it, but I have been unable to get the application to step through the code. Any suggestions.........
 
Try the code, try also closing and reopening the db a couple of times.

To get to the error, you may also try just commenting the errorhandler, as the error you describe, is probably because of errorhandling in the routine. So comment any line starting with on error goto, and you should get the "ugly" message with Debug on;)
 
Hello RGALLEN!
About error 13 look at DemoErr13A2002,
I think it can help you.
 

Attachments

Thanks MStef. I will looked through the code and found the following:

A function where my error trapping is set to: MsgBox Err.Number and every where else it is: MsgBox Err.Number & " " & Err.Description

I now no my problem is located within this function I just have to find it. I have also attached a picture of the error. Thanks for everyone’s help. :)
 

Attachments

Users who are viewing this thread

Back
Top Bottom