Listing A
Public Function SetStartupOptions(propertyname As String, _
    propertytype As Variant, propertyvalue As Variant) _
    As Boolean
  Dim dbs As Object
  Dim prp As Object
  Set dbs = Application.CurrentDb
  On Error Resume Next
  dbs.Properties(propertyname) = propertyvalue
  If Err.Number = 3270 Then
    Set prp = dbs.CreateProperty(propertyname, _
        propertytype, propertyvalue)
    dbs.Properties.Append prp
    Application.RefreshTitleBar
  Else
    SetStartupOptions = False
  End If
  Set dbs = Nothing
  Set prp = Nothing
End Function