Solved

Error #0 and VB

Posted on 2002-05-09
3
168 Views
Last Modified: 2010-05-02
I am getting an Error #0 msgbox when loading a form that is connecting to a SQL DB and getting Recordsets.  If I click ok, the form opens fine.

I cannot figure out why I'm getting this error?

Any ideas?

0
Comment
Question by:baddogi
  • 2
3 Comments
 
LVL 4

Accepted Solution

by:
RichW earned 100 total points
ID: 6999542
Look at the error handler in the form.

What is most likely happening is that an error is raised,  and the Error object is getting reset prior to displaying the error value.  

Check your error handling code.
0
 
LVL 15

Expert Comment

by:ameba
ID: 6999680
You forgot "Exit Sub" or "Exit Function" before error label.

Sub SomeSub()
     On Error GoTo EH
     '...
     '...
     Exit Sub          '  <<<< this is missing
EH:
     ShowError
End Sub
0
 
LVL 4

Expert Comment

by:RichW
ID: 6999734
ameba is correct.  That could also be it.
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

743 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now