Function MyFunction () As Integer ' 'NOTE: This procedure contains line break characters 'for readability. These characters are not supported 'in Access Basic. ' ' 'Write any local declarations here. ' On Error GoTo MyFunction_Err ' 'Write code here. ' MyFunction_Exit: ' 'Write any "clean up" lines here. ' Exit Function
MyFunction_Err: Select Case Err ' 'Enter known error number cases here. ' Case Else MsgBox Err & ": " & Error$(Err), 16, _ "MyFunction Error" Resume MyFunction_Exit End Select End Function