I think that is what you want, but I am never greatly in favour of adding information to a table that could confuse future users.
Option Compare Database
Option Explicit
Sub Usage()
SetProperty "Table1", "ID", "Caption", "This is an ID"
End Sub
Sub SetProperty(TableName As String, Fieldname As String, _
PropertyName As String, PropertyValue As Variant, _
Optional PropertyType As Variant = dbText)
Dim db As DAO.Database
Dim fld As DAO.Field
Dim prp As DAO.Property
On Error GoTo Err_Property
Set db = CurrentDb
Set fld = db.TableDefs(TableName).Fields(Fieldname)
fld.Properties(PropertyName) = PropertyValue
''Debug.Print fld.Properties(PropertyName)
Exit Sub
Err_Property:
' Error 3270 means that the property was not found.
If DBEngine.Errors(0).Number = 3270 Then
' Create property, set its value, and append it to the
' Properties collection.
Set prp = fld.CreateProperty(PropertyName, _
PropertyType, PropertyValue)
fld.Properties.Append prp
Resume Next
Else
MsgBox Err.Description
End If
End Sub