Changing Access Table Properties from Word

B

Bo Hansson

Following attemt fails - how to do it?

Dim dbs As Database, tdf As TableDef, idx As DAO.Index



Set dbs = OpenDatabase("DataBaseName")



Set tdf = dbs.TableDefs("TableName")



Set idx = tdf.Indexes("FieldName")




idx.Unique = False



"Cannot set the property of an objekt that is part of a collection"



????



Bo Hansson
 
J

Jezebel

The Unique property of a DAO Index is read only once the Index has been
appended to the Indexes collection. You need to delete the index and
recreate it.
 
B

Bo Hansson

OK, thanks a lot!

Bo Hansson

Jezebel said:
The Unique property of a DAO Index is read only once the Index has been
appended to the Indexes collection. You need to delete the index and
recreate it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top