?
Solved

VB Code debugging in Access

Posted on 2006-07-14
3
Medium Priority
?
274 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 80 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

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

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

A short article about problems I had with the new location API and permissions in Marshmallow
Make the most of your online learning experience.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

801 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