P
peljo via AccessMonster.com
What is wrong with my function to change index ? I want to change the indexed
property of the field delays from the table visits but i do not know am i
doing this properly.Could you help ? The field delays has the indexed
property set to Indexed Yes(Duplicates OK) and i want to remove it with the
function below
Public Function Cur()
Dim dbs As DAO.Database
Set dbs = CurrentDb
Dim tdf As DAO.TableDef
Dim fld As DAO.Field
Dim prp As DAO.Property
Dim idx As DAO.Index
Set tdf = dbs.TableDefs("visits")
Set idx = tdf.CreateIndex("delays")
idx.Unique = False
tdf.Indexes.Append idx
dbs.Close
Set prp = Nothing
Set idx = Nothing
Set fld = Nothing
Set tdf = Nothing
Set dbs = Nothing
End Function
property of the field delays from the table visits but i do not know am i
doing this properly.Could you help ? The field delays has the indexed
property set to Indexed Yes(Duplicates OK) and i want to remove it with the
function below
Public Function Cur()
Dim dbs As DAO.Database
Set dbs = CurrentDb
Dim tdf As DAO.TableDef
Dim fld As DAO.Field
Dim prp As DAO.Property
Dim idx As DAO.Index
Set tdf = dbs.TableDefs("visits")
Set idx = tdf.CreateIndex("delays")
idx.Unique = False
tdf.Indexes.Append idx
dbs.Close
Set prp = Nothing
Set idx = Nothing
Set fld = Nothing
Set tdf = Nothing
Set dbs = Nothing
End Function