I found the answer at
http://www.microsoft.com/office/com...sign&mid=2766c6b5-5603-40fe-9dda-396fbd33ffc3
Access 2000 (or DAO) seems to require different parameters. I modified the above URL's code with the previously mentioned knowledge base code to get the following (which works as long as you already have the custom property created in the file/databaseproperties/custom tab:
Function ChangeProperty(stPropName As String, _
PropType As DAO.DataTypeEnum, vPropVal As Variant) _
As Boolean
' Uses the DDL argument to create a property
' that only Admins can change.
'
' Current CreateProperty listing in Access help
' is flawed in that anyone who can open the db
' can reset properties, such as AllowBypassKey
'
On Error GoTo ChangeProperty_Err
Dim db As DAO.Database
Dim prp As DAO.Property
Dim doc As DAO.Document 'my addition
Const conPropNotFoundError = 3270
Set db = CurrentDb
Set doc = db.Containers!Databases.Documents!UserDefined
' Assuming the current property was created without
' using the DDL argument. Delete it so we can
' recreate it properly
doc.Properties.Delete stPropName
Set prp = db.CreateProperty(stPropName, _
PropType, vPropVal, True) 'doc.createproperty doesn't work
doc.Properties.Append prp 'but now the append does!
' If we made it this far, it worked!
ChangeProperty = True
ChangeProperty_Exit:
Set prp = Nothing
Set db = Nothing
Exit Function
ChangeProperty_Err:
If Err.Number = conPropNotFoundError Then
' We can ignore when the prop does not exist
Resume Next
End If
Resume ChangeProperty_Exit
End Function