VBA/Jet Error handling

  • Thread starter Thread starter NH
  • Start date Start date
N

NH

I am trying to to trap and handle a Jet error;
-2147217865: The Microsoft Jet database engine could not find the object....

I have tried to put the following line in my error handling;

If err.number = -2147217865 Then ...

but it never matches..

Debug.print err.number gives me -2147217865,
but IF err.number = -2147217865 never fires..

What am I doing wrong?

Thanks
 
NH said:
I am trying to to trap and handle a Jet error;
-2147217865: The Microsoft Jet database engine could not find the
object....

I have tried to put the following line in my error handling;

If err.number = -2147217865 Then ...

but it never matches..

Debug.print err.number gives me -2147217865,
but IF err.number = -2147217865 never fires..

What am I doing wrong?

Thanks
 
NH,
when you step through the code, find which line causes the error.

If for example the error happened on a line which said
DoCmd.OpenForm "frmMyNewHate"
You would check that the form called frmMyNewHate was correctly spelled.


Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia
 
Back
Top