Solved

Error #0 and VB

Posted on 2002-05-09
3
172 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
[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
  • 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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
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 utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

733 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