I can't reproduce the same error on debug mode

I have an application that is installed on a machine and which gives me first a managed error: "customer doesn't exist"
then It gives me an unmanager error:
"Run time error: 438
Object doesn't support this property or method"

Then, the applications exits and the user has to start the whole application again

But when I try to debug the application on my PC, all I get is the first managed error: "customer doesn't exist" and my application gives me back the control. It never exits and doesn t behave as it does on the other machine on which I have the application installed and runing

I don t have that much code runing after the first managed error: "customer doesn't exist"
This is the code that runs after my managed error and which is supposed to be causing exit on the production machine:

cmdRechArticleBp.Enabled = True
txtArticle.Text = ""
txtDescription.Text = ""
txtFournisseur.Text = ""
txtNoProdFour.Text = ""
txtCoutantIO.Text = ""
txtCoutantNovexco.Text = ""
txtPrixNet(0).Text = ""
txtPrixNet(1).Text = ""
txtPrixNet(2).Text = ""
txtPrixNet(3).Text = ""
txtPrixDetail.Text = ""

mcLastField.SetFocus
Screen.MousePointer = vbDefault

Any help pls
[1362 byte] By [R.Tutus] at [2007-12-24]
# 1

I think we need to see the code before the error, not after.

Here's a suggestion. If you have a try-catch block around there. Comment it out and put the catch code in an if (false) then -endif block. The objective is to have an unmanged exception allowing you to get a stack dump to see what's going on.

What is the nature of the object on which you are getting an exception?

ReneeC at 2007-8-31 > top of Msdn Tech,Visual Basic,Visual Basic Language...
# 2

that s the code mentioned above that runs before I get the error: object doesn t support method or property. Then the application exits.

Sorry may be i didn t use the right term when I said "managed error). Here is what I meant by my first managed error:

The first message was our own message that we display when the user enters invalid input: "customer doesn't exist" ( do we call this part a managed error or does managed error refer to something else in programming)
So the buttom line I m not using any try catch block.

Thanks

R.Tutus at 2007-8-31 > top of Msdn Tech,Visual Basic,Visual Basic Language...
# 3

Well if you not using a try catch block OR an form of error handling then you should definately put some in you code to capture any exceptions. This way you'll be able to trap any unexpected exceptions, as this is in essence what an exception is for.

With this exception you can see if there is a second exception occuring after the customer doesnt exist validation. This exception handling can occur either in debug or at runtime and basically means you are capturing this and dealing with it.

spotty at 2007-8-31 > top of Msdn Tech,Visual Basic,Visual Basic Language...
# 4

why do we have to use try catch. doesn t VB give us the error as if we were using try catch

thanks for explaning that to me.

R.Tutus at 2007-8-31 > top of Msdn Tech,Visual Basic,Visual Basic Language...