Create Autonumber/ReplicationID field using DAO
Posted on 2002-06-19
I am trying to create fields in tables that are GUIDs. In Access 2000, the field is an Autonumber with a size of ReplicationID.
I can create Autonumber fields but can't seem to figure out the ReplicationID attribute. Here is my code for the Autonumber:
Dim db As Database, t As TableDef, fAdd As Field
Set db = CurrentDb
For Each t In db.TableDefs
Set fAdd = t.CreateField("GUID", dbLong)
fAdd.Attributes = dbAutoIncrField
I tried lots of different options without success.
Thanks for your help!!