ThomMenzies
MIS
2 queries really.
I have the following simple code to produce a table in code with a unique primary key:
Set tdf = DB.CreateTableDef(strTempSR)
Set fld = tdf.CreateField("ID", dbInteger, 3)
tdf.Fields.Append fld
DB.Execute "CREATE UNIQUE INDEX PrimaryKey ON " & strTempSR & " (ID)"
What I want to do is create another field as an autonumber, and then sort the table by the autonumber but I'm not sure how to do it.
Any help is greatly appreciated.
Thom.
I have the following simple code to produce a table in code with a unique primary key:
Set tdf = DB.CreateTableDef(strTempSR)
Set fld = tdf.CreateField("ID", dbInteger, 3)
tdf.Fields.Append fld
DB.Execute "CREATE UNIQUE INDEX PrimaryKey ON " & strTempSR & " (ID)"
What I want to do is create another field as an autonumber, and then sort the table by the autonumber but I'm not sure how to do it.
Any help is greatly appreciated.
Thom.