On Error does not work! HELP!!!

francoiss

Registered User.
Local time
Today, 11:23
Joined
Mar 6, 2007
Messages
14
i used this function, there is an error handler already but it seems the error handler doesnt work, can someone please, in any way, help me...thanks a lot
---------------------------------
Public Function TableExists(TableName As String) As Boolean

Dim strTableNameCheck

On Error GoTo ErrorCode

strTableNameCheck = CurrentDb.TableDefs(TableName)

TableExists = True

ExitCode:
On Error Resume Next
Exit Function

ErrorCode:
Select Case Err.Number
Case 3265 'Item not found in this collection
TableExists = False
Resume ExitCode
Case Else
MsgBox "Error " & Err.Number & ": " & Err.Description, vbCritical, "hlfUtils.TableExists"
'Debug.Print "Error " & Err.number & ": " & Err.Description & "hlfUtils.TableExists"
Resume ExitCode
End Select

End Function
 
In the VBA editor, make sure in Tools/Options/General the error trap setting is "Break on unhandled errors".
 
hey pbaldy!:) thanks a lot!!!
im using japanese OS that7s why it7s hard to recognize menus, good thing you helped me, a million thanks again!!!
 
hey pbaldy!:) thanks a lot!!!
im using japanese OS that7s why it7s hard to recognize menus, good thing you helped me, a million thanks again!!!


I can see you're stuck either w/ a japanese company or a jap bought PC, ....or both, like me :D Welcome to my life
 
hahahaha bullseye bro! :D
it's nice to know.....
.
.
.
that im not alone bwahahahaha :D
 
Last edited:

Users who are viewing this thread

Back
Top Bottom