J
js
Hi, how to use DAO to create a table with autonumber field?
tdf.Fields.Append .CreateField(FieldsToAdd(ind).FieldName, dbInteger) //??
how to specify it's autonumber field??
Thanks...
Dim MyWorkspace As Workspace
Dim db As Database
Dim tdf As TableDef
DBEngine.SystemDB = App.Path & "\" & DW
Set MyWorkspace = DBEngine.CreateWorkspace("New", login, pw)
'Open the database
Set db = MyWorkspace.OpenDatabase(App.Path & "\" & DW)
Set tdf = db.TableDefs("tb1")
tdf.Fields.Append .CreateField(FieldsToAdd(ind).FieldName,
dbInteger)
tdf.Fields.Append .CreateField(FieldsToAdd(ind).FieldName, dbInteger) //??
how to specify it's autonumber field??
Thanks...
Dim MyWorkspace As Workspace
Dim db As Database
Dim tdf As TableDef
DBEngine.SystemDB = App.Path & "\" & DW
Set MyWorkspace = DBEngine.CreateWorkspace("New", login, pw)
'Open the database
Set db = MyWorkspace.OpenDatabase(App.Path & "\" & DW)
Set tdf = db.TableDefs("tb1")
tdf.Fields.Append .CreateField(FieldsToAdd(ind).FieldName,
dbInteger)