Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Error #0 and VB

Posted on 2002-05-09
3
Medium Priority
?
177 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 400 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

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Question has a verified solution.

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

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Suggested Courses

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