Im creating a table in Access 2000 and would like to be able to add a primary key to one of the columns. Im currently referencing:
MS ActiveX Data Objects 2.7 Library
MS ADO Ext. 2.7 for DLL and Security
MS DAO 2.5/3.51 Compatability Library
I dont really know how to setup a key, my assumptions, taken from other threads, is this:
Dim keyIndex As ADOX.index
keyIndex.Name = "TableIndex"
keyIndex.Unique = True
keyIndex.Columns.Append "EAN 8/13"
newTBL.Indexes.Append keyIndex
Would this be correct? Cause if it is i guess Im missing a reference as it doesnt work. Any one able to help?
TIA
~*Gwar3k1*~
"To the pressure, everything's just like: an illusion. I'll be losing you before long..."
MS ActiveX Data Objects 2.7 Library
MS ADO Ext. 2.7 for DLL and Security
MS DAO 2.5/3.51 Compatability Library
I dont really know how to setup a key, my assumptions, taken from other threads, is this:
Dim keyIndex As ADOX.index
keyIndex.Name = "TableIndex"
keyIndex.Unique = True
keyIndex.Columns.Append "EAN 8/13"
newTBL.Indexes.Append keyIndex
Would this be correct? Cause if it is i guess Im missing a reference as it doesnt work. Any one able to help?
TIA
~*Gwar3k1*~
"To the pressure, everything's just like: an illusion. I'll be losing you before long..."