ErrorHandler:
If err.Number = 3270 ThenThe property was not found; create it:Set prp = dbsCalling.CreateProperty(Name:=strName, _
Type:=lngType, Value:=varValue)
dbsCalling.Properties.Append prp
Resume Next
Else
MsgBox “Error No: “ & err.Number _
& “; Description: “ & err.Description
Resume ErrorHandlerExit
End IfEnd SubPublic Function GetProperty(strName As String, _
strDefault As String) As Variant
‘Called from various proceduresOn Error GoTo ErrorHandlerAttempt to get the value of the specified property:Set dbsCalling = CurrentDb
GetProperty = dbsCalling.Properties(strName).ValueErrorHandlerExit:
Exit FunctionErrorHandler:
If err.Number = 3270 ThenThe property was not found; use default value:GetProperty = strDefault
Resume Next
Else
MsgBox “Error No: “ & err.Number _
& “; Description: “ & err.Description
Resume ErrorHandlerExit
End IfEnd FunctionPart III Adding More Functionality to Office