Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Modules / DAO / VBA / September 2007

Tip: Looking for answers? Try searching our database.

Unknown error

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Mike - 19 Sep 2007 16:44 GMT
I have a standard "error trap" in a form..

On Error goto ...

lable
  mesbox
  call exit lable

label
 exit

however i keep getting a "blank" error then an error that says to resume w/o
error.

any ideas?
Douglas J. Steele - 19 Sep 2007 17:03 GMT
You need to put Exit Sub (or Exit Function if you're dealing with a
function) before the code for your error handler:

On Error GoTo Err_Routine

' code

End_Routine:
 Exit sub

Err_Routine:
' code
 Resume End_Routine

Note the use of Resume in the error handler. That ensures that the error is
cleared from the stack.  Any cleanup that's required whether or not the
routine is successful would go into the End_Routine block before the Exit
Sub line.

Signature

Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)

>I have a standard "error trap" in a form..
>
[quoted text clipped - 12 lines]
>
> any ideas?
Mike - 19 Sep 2007 17:14 GMT
thanks for the info. i'll try that after lunch.

why does the the exit have to go before the error?

> You need to put Exit Sub (or Exit Function if you're dealing with a
> function) before the code for your error handler:
[quoted text clipped - 31 lines]
> >
> > any ideas?
Douglas J. Steele - 19 Sep 2007 19:14 GMT
If you don't put the Exit, code execution will continue into the error
handler.

Access has no way of knowing that you only want to run the error handler
code when there's an error.

Signature

Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)

> thanks for the info. i'll try that after lunch.
>
[quoted text clipped - 37 lines]
>> >
>> > any ideas?
John W. Vinson - 19 Sep 2007 19:03 GMT
>I have a standard "error trap" in a form..
>
[quoted text clipped - 11 lines]
>
>any ideas?

Please post your actual code and the actual error message. There is nothing in
Access called "mesbox", "call exit lable" is meaningless, and the error
certainly doesn't say that.

            John W. Vinson [MVP]
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.