Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Microsoft Access > What would caus...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 4 Topic 29960 of 31576
Post > Topic >>

What would cause an error handler to work only once

by "ragtopcaddy via AccessMonster.com" <u9289@[EMAIL PROTECTED] > Apr 14, 2008 at 08:30 PM

I have an error handler: On Error GoTo Outtahere
At the end of the routine, the OuttaHere section reads:

OuttaHere:
If Err.Number <> 0 Then
    If Err.Number = 3061 Then
        Debug.Print "   Failed to get " & strFileName & " data"
        Err.Clear
        GoTo NextFile     'most likely, the spreadsheet lacks the
lowUtilizationANDMemory field
    Else
        MsgBox "Error # " & Err.Number & ", " & Err.Description & ",
occurred.
The function 'GetLowUtilServers' will abort.", _
                vbCritical + vbOKOnly, "Failed To Record Dashboard LowUtil
Data"
        Err.Clear
    End If
End If

The error 3061 happens when a field called in a query doesn't exist in the
spreadsheet. This is expected behavior. I'm looping through a directory
full
of spreadsheets. I'd like to resume the loop at the NextFile section:

NextFile:
        strFileName = Dir
    Loop
End If

-- 
Bill Reed

"If you can't laugh at yourself, laugh at somebody else"

Message posted via http://www.accessmonster.com
 




 4 Posts in Topic:
What would cause an error handler to work only once
"ragtopcaddy via Acc  2008-04-14 20:30:36 
Re: What would cause an error handler to work only once
"ragtopcaddy via Acc  2008-04-14 20:33:16 
Re: What would cause an error handler to work only once
Salad <oil@[EMAIL PROT  2008-04-14 14:12:34 
Re: What would cause an error handler to work only once
Bob Quintal <rquintal@  2008-04-14 18:24:53 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Wed Dec 3 1:29:51 CST 2008.