Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

URGENT How do you hide error msg

Status
Not open for further replies.

riarc

Programmer
Dec 6, 2001
44
US
I need to hide an ODBC error message. How do I do that?
 
Hi Riarc,

Try this:
In your code, find out which line creates the error message, then do the following:

Code:
Sub Test()
    ...
    on error goto err_ODBC   'if finds error from now on
                         'it will jump to err_ODBC
        ... 'here is your code that creates the error
    on error goto 0          'if finds error after, will
                         'display it
    ...
    Exit Sub
err_ODBC:            
    'Here create code to deal with error
    Resume LineX          'LineX is another line in your 
                          'code where you want to jump
End Sub
[\code]


Have fun,

Nath
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top