You can add a custom Property to your tables, and set this to reflect
the nature of the data.
For example, running the following in the Immediate Window:
gfAddCustomTableProp("MyTable", "DataClass", "Static")
would add a new property called 'DataClass' and assign it as Static (or
Dynamic, as you require).
The code for the above function is:
' ========= Code Start ==============
Public Function gfAddCustomTableProp%(TableName$, PropName$, PropValue$)
On Error GoTo err_gfAddCustomTableProp
Dim db As Database: Set db = CurrentDb
Dim tdf As TableDef
Dim prp As Property
Dim PropExists%
Set tdf = db.TableDefs(TableName)
Debug.Print tdf.Name & " *********"
For Each prp In tdf.Properties
If prp.Name = PropName Then
PropExists = True
Debug.Print "Property Exists: " & prp.Name, prp.Value
Exit For
End If
Next prp
If Not PropExists Then
Set prp = tdf.CreateProperty(PropName, dbText, PropValue)
tdf.Properties.Append prp
Set prp = tdf.Properties(PropName)
Debug.Print "Property Created: " & prp.Name, prp.Value
End If
Debug.Print ""
gfAddCustomTableProp = True
exit_gfAddCustomTableProp:
Set db = Nothing: Set tdf = Nothing: Set prp = Nothing
Exit Function
err_gfAddCustomTableProp:
MsgBox Err & ": " & Err.Description
Resume exit_gfAddCustomTableProp
End Function
' ========= Code End ==============
HTH.
*** Sent via Developersdex
http://www.developersdex.com ***