Hi - I am trying to create a unique index in an existing table that I will be able to use later to update records. I have the code below. The index Ind field is being created in the table TempAPT but it is not populating with an index. A simple index starting at 1 and growing at an increment of 1 for each row will suffice. What am I doing wrong? This is in VBA Access 2003. Thanks
Code:
Public Sub addColAPT() DoCmd.SetWarnings False strSql = "ALTER TABLE TempAPT ADD COLUMN Ind DOUBLE" CurrentProject.Connection.Execute strSql strSql = "CREATE INDEX Ind ON TempAPT(Ind)" CurrentProject.Connection.Execute strSql DoCmd.SetWarnings True End Sub
Comment