Create an index
Sub exaCreateIndex() Dim db As Database Dim tdf As TableDef Dim idx As Index Dim fld As Field Set db = CurrentDb Set tdf = db.TableDefs!BOOKS Set idx = tdf.CreateIndex("PriceTitle") Set fld = idx.CreateField("Price") idx.Fields.Append fld Set fld = idx.CreateField("Title") idx.Fields.Append fld tdf.Indexes.Append idx End Sub
1. | Database relations | ||
2. | Reference column name from TableDefs | ||
3. | Add new property to TableDef | ||
4. | List table properties | ||
5. | Create a relation | ||
6. | Create new field with validation rule |