473,809 Members | 2,709 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Debugging Access 2002 vs 97

I have been comfortable debugging VBA modules using Access 97. I recently
acquired Office XP and converted my applications to Access 2000. In general
they seem to run fine, but there's a bug in one (which may have been there
before conversion).

I now find that I can't get started debugging modules in 2002. If I call up
a module from a form I get the VBA in a new window; that's not very
troublesome. BUT when I insert a breakpoint in the code the procedure
doesn't stop there - just goes on and completes.

I've seen references to "break mode" in the help system, but when I click on
that button nothing seems to happen.

I sure could use some help in "getting over the hump" so I can get on with
bug-fixing.
Feb 2 '06 #1
8 3547
Is it possible that the line that the break is on just isn't being executed?
Have you tried placing the break earlier in the procedure on a line that you
are positive is being executed and stepping through the procedure?

As a work around, you may be able to insert a Stop statement or Debug.Print
statements to see what is happening.

Try importing everything into a new MDB file, compile the new file, and see
if that works. If so, and if you want to keep the old file, you may be able
to decompile the code in the old file to clean out the problem. If you
attempt this, do it on a copy of the file for safety. Open the file using a
command line similar to the following:

"<path>\Msacces s.exe" "<path>\FileNam e.mdb" /decompile

Add any other switches you may need for your file (i.e. user name, workgroup
file name, password, etc). Once the file is open, enter Alt+F11 to open the
code window and go to Debug|Compile to recompile the code. Next, do a
Compact and Repair.

--
Wayne Morgan
MS Access MVP
"Richard Cleaveland" <Ne************ @rgcle.com> wrote in message
news:tI******** ************@co mcast.com...
I have been comfortable debugging VBA modules using Access 97. I recently
acquired Office XP and converted my applications to Access 2000. In
general
they seem to run fine, but there's a bug in one (which may have been there
before conversion).

I now find that I can't get started debugging modules in 2002. If I call
up
a module from a form I get the VBA in a new window; that's not very
troublesome. BUT when I insert a breakpoint in the code the procedure
doesn't stop there - just goes on and completes.

I've seen references to "break mode" in the help system, but when I click
on
that button nothing seems to happen.

I sure could use some help in "getting over the hump" so I can get on with
bug-fixing.

Feb 2 '06 #2
On 2-Feb-2006, "Wayne Morgan" <co************ *************** @hotmail.com>
wrote:
Ref: number1.nntp.dc a.giganews.com comp.databases. ms-access:849938

Is it possible that the line that the break is on just isn't being
executed?
Have you tried placing the break earlier in the procedure on a line that
you
are positive is being executed and stepping through the procedure? I'm positive it's being executed. Since writing the above I have
reinstalled Access 97 and used the original copy of one of the applications;
the processing stops there.
As a work around, you may be able to insert a Stop statement or
Debug.Print
statements to see what is happening. A stop didn't work; haven't tried the debug.print, but the likelihood of
that working in the face of the other indications seems low.
Try importing everything into a new MDB file, compile the new file, and
see
if that works. Compile? I thought the compile was automatic. I don't find "compile" in the
help system. Anyway, a reconversion gives the same result.

<snip> --
Wayne Morgan
MS Access MVP
I can't help but think there's some preliminary step I have to go through in
order to get Access to allow me to debug or recognize breakpoints - like set
a mode or something. I DID hit that "break" icon on the VB window toolbar.

Dick
"Richard Cleaveland" <Ne************ @rgcle.com> wrote in message
news:tI******** ************@co mcast.com...
I have been comfortable debugging VBA modules using Access 97. I
recently
acquired Office XP and converted my applications to Access 2000. In
general
they seem to run fine, but there's a bug in one (which may have been
there
before conversion).

I now find that I can't get started debugging modules in 2002. If I
call
up
a module from a form I get the VBA in a new window; that's not very
troublesome. BUT when I insert a breakpoint in the code the procedure
doesn't stop there - just goes on and completes.

I've seen references to "break mode" in the help system, but when I
click
on
that button nothing seems to happen.

I sure could use some help in "getting over the hump" so I can get on
with
bug-fixing.

Feb 2 '06 #3
I've never had to set anything as a "preliminar y" to get a break point to
work. When the code reaches the break point, it stops and pops up in the
coding window.

--
Wayne Morgan
MS Access MVP
"Richard Cleaveland" <Ne************ @rgcle.com> wrote in message
news:FP******** ************@co mcast.com...

I can't help but think there's some preliminary step I have to go through
in
order to get Access to allow me to debug or recognize breakpoints - like
set
a mode or something. I DID hit that "break" icon on the VB window toolbar.

Feb 2 '06 #4
Well, Office 2003 should arrive today - maybe I'll have better luck with it.

Dick
Feb 2 '06 #5
Richard Cleaveland wrote in message
<tI************ ********@comcas t.com> :
I have been comfortable debugging VBA modules using Access 97. I recently
acquired Office XP and converted my applications to Access 2000. In general
they seem to run fine, but there's a bug in one (which may have been there
before conversion).

I now find that I can't get started debugging modules in 2002. If I call up
a module from a form I get the VBA in a new window; that's not very
troublesome. BUT when I insert a breakpoint in the code the procedure
doesn't stop there - just goes on and completes.

I've seen references to "break mode" in the help system, but when I click on
that button nothing seems to happen.

I sure could use some help in "getting over the hump" so I can get on with
bug-fixing.


I'm not sure, but you might want to check the Use Access Special Keys
thingie in the Tools | Startup. I think if this is set, also the
AllowBreakIntoC ode property, which I suspect is causing this, is also
set.

Alternatively try the following, to do it through code

dim db as dao.database
with db
.Properties("Al lowBreakIntoCod e") = False
.Properties("Al lowSpecialKeys" ) = False
end with

--
Roy-Vidar
Feb 2 '06 #6
"Wayne Morgan" <co************ *************** @hotmail.com> wrote in
news:sI******** ***********@new ssvr21.news.pro digy.com:
I've never had to set anything as a "preliminar y" to get a break
point to work. When the code reaches the break point, it stops and
pops up in the coding window.


The code can't be already executing at the time you set the
breakpoint, however. One of the things that I don't like about A2K
and its successors is the way that code is considered to be
executing at times that it was not in A97 and before. Actually, it's
probably more a function of the separate VBE window, which allows
you to view code in contexts where A97, having only one window,
would not allow it.

The solution may be to open the form or report in design view, go to
the code window, set the break point, save the object, and *then*
open it and execute the code. It may be that you have to bypass your
startup routines to avoid executing code that would prevent the
addition of breakpoints.

--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/
Feb 2 '06 #7
"Richard Cleaveland" <Ne************ @rgcle.com> wrote in
news:9I******** *************** *******@comcast .com:
Well, Office 2003 should arrive today - maybe I'll have better
luck with it.


I doubt it. It's just an upgrade to A2K, which introduced the
independent VBE window, and introduced these kinds of problems with
code execution seeming to be out of synch with what you're seeing in
the application window. I've found this annoying from the first time
I ever used A2K.

On another note, the fact that it works in A97 and doesn't in A2K
does not mean everything was OK in A97. You could have compiled code
corruption in your A97 MDB that is masking an underlying compile
error. That was the basis for suggesting a decompile, though I think
you should do it in the A97 version. While it's extremely unlikely
for compiled code corruption to survive the conversion from A97 to
A2K, the hidden code corruption in A97 could make you think that the
problem was with A2K, when, in fact, it is A2K that is doing it
right and revealing a problem that was hidden in A97.

As to compiling, yes, there's automatic compilation, but I turn it
off. In the Access 97 options (and the A2K+ VBE options) I would
always turn off COMPILE ON DEMAND, which reduces the number of times
code compiles without you're requesting the compile explicitly. I
always keep the COMPILE button on my toolbar in code view, and
compile after nearly every code edit. This flushes out any problems
with my new code as soon as I've made them, rather than waiting for
an automatic compile to reveal them.

Last of all, read this article:

http://trigeminal.com/usenet/usenet004.asp?1033

Take note that the first major heading is "VBA and the 11 Stages of
Compilation." That gets your attention, eh? :)

--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/
Feb 2 '06 #8
Hoooooray! - that did it. THANK YOU!

Dick
On 2-Feb-2006, "RoyVidar" <ro************ *@yahoo.no> wrote:
I'm not sure, but you might want to check the Use Access Special Keys
thingie in the Tools | Startup. I think if this is set, also the
AllowBreakIntoC ode property, which I suspect is causing this, is also
set.

Feb 2 '06 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1123
by: DMS | last post by:
I have recently set 5 XP Pro (2002) SP-1 machines up (using a cloning process) to run the MS Visual Studio.NET 2002 environment. (Ver. 7.0.9466) I can't get the Debugging function to work for the first user to try running Studio.NET. When they try to debug their program they get an error: " Unable to start debugging. Access is denied. Verify that you are an administrator or
1
2056
by: Gary K | last post by:
I am trying to setup remote debugging on my first client-server setup, so hopefully this problem is just stupidity on my part. The client machine is running Windows XP Pro/SP2 with Visual Studio .NET 2002 and the server is Windows Server 2003 with the Server Components installed from VS. Both machines are in the domain, and the user is an administrator of both machines and has been added to the VS Developers group & the Debugger Users group...
9
2889
by: Rob | last post by:
Scenario: O/S: Win XP Professional Back-end: Access 2002 on network server I have an Access 97 application, in production on our network, that takes appoximately 5 minutes to process monthly data. I find this tolerable. The Access 2002 test version, on the network, takes approximately 50
8
3524
by: Matt Theule | last post by:
While stepping through an ASP.NET project, I found that data was being inserted into my database even though I was not stepping through the code that inserted the data. I have a single page with inline code. The page has a Datagrid, a textbox and a button. When the button is clicked, the value of the textbox is inserted into the table whose contents are displayed on the page. The problem occurs when I set a breakpoint on a line *IN*...
3
5536
by: Steve Wark | last post by:
I have a Windows 2003 Web server on which I was debugging remotely with no problems. I then moved this server to a different domain and now remote debugging will not work, the error is; Auto-attach to process ' w3wp.exe' on machine 'CSS5' failed. Error code 0x80070005 (Access is denied. ). I have found a number of articles and it would appear that the problem
16
4231
by: Serdar Kalaycý | last post by:
Hi everybody, My problem seems a bit clichè but I could not work around. Well I read lots of MSDN papers and discussions, but my problem is a bit different from them. When I tried to run the project in debug mode (by hitting F5) it gives an error message "Error while trying to run project: Unable to start debugging on the web server.
4
1175
by: Sindbaad | last post by:
I'm newbie to VB.net, I used to work on Ver VB 6.0. When I'm debugging using VB.Net it is not allowing me to update any code when I'm running. Also when I do F8 it is not taking me thru the whole code, it goes into the initial event and then it exits the debugger and runs the whole application. Do I need to set some thing or its the behaviour with the .Net.
3
2368
by: =?Utf-8?B?SmVmZnJleQ==?= | last post by:
Just started to test a VB.net 2002 project for ASP.net application. After successfully installed the VS.net 2002 and tested the IIS 5.1 on XP Pro SP2 for some classical ASP programs, I am starting to build ASP.net programs now. For a new ASP.net project, an error message (i.e Unable to start debugging on the web server) popped out. I disabled the ASP.net debugging for 3-4 projects. However, I either could not see the ASP.net...
0
2763
by: Sebastian | last post by:
Hello I develop my applications in Access 2002. My development system is running Windows XP SP2 and I have Microsoft Office XP Developer. Microsoft Office XP is at SP3. I used Inno Setup (great product) to install my applications. When the Access Runtime was needed on the system I simply ran 'accessrt.msi' from Microsoft Office Developer discs. When another version of Access (other than Access 2002) was on the system then I simply...
0
9721
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9602
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10639
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10376
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10383
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9200
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7661
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5550
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5688
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.