Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

VB Code debugging in Access

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

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

Question has a verified solution.

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

In real business world data are crucial and sometimes data are shared among different information systems. Hence, an agreeable file transfer protocol need to be established.
Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Simple Linear Regression

810 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