Solved

VB Code debugging in Access

Posted on 2006-07-14
3
267 Views
Last Modified: 2010-04-17
Hi all,

i have some code written by a colleague who has now left which takes data written into an access/sql adp and writes it into a word document.

the problem im having is that it's not producing any word docs yet is not producing any error messages when it's run, how can i find out which element is causing it to fail when the code is not actually failing?

does this make sense? normally the access debugger will immediately point to the part of code where the problem lies but it's not as it doesn't recoignise a problem but obviously somewhere it is failing.  

I will add more points if need be just need an old q refunded first

cheers

greg
0
Comment
Question by:Dubs
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 21

Accepted Solution

by:
MogalManic earned 20 total points
ID: 17106994
There are a few things you can try:
 -You can set a breakpoint at the onclick event that starts the process and the debugger will start
 -You can use Debug.Print to insert debug messages in the console
     eg. Debug.Print intCount & ": " & rst![ID] & ", " & rst![Name]
 -You can insert a Debug.Assert or stop statement to stop debugger at key points based on a condition

For more detail, see this link:http://www.fmsinc.com/tpapers/vbacode/Debug.asp#WritingCodeforDebugging
0
 
LVL 6

Expert Comment

by:davbouchard
ID: 17112338
Maybe there is a line in the code which does "on error resume next". This will skip errors. What you could try is setting alt on all errors from the menu.

If you get nothing, then there must be a logical problem with the code. You will have to look and see what it actually does. Has the code ever worked before?
0
 

Author Comment

by:Dubs
ID: 17120187
i found out what was happening, the software had moved drive so on it's original drive it brought up the save as dialog but on the new drive it didn't.  not sure why

sorted now

greg
0

Featured Post

Enroll in June's Course of the Month

June’s Course of the Month is now available! Experts Exchange’s Premium Members, Team Accounts, and Qualified Experts have access to a complimentary course each month as part of their membership—an extra way to sharpen your skills and increase training.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

724 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