![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I am trying to add a Field FieldName = "MemAddID" to a table With MyTblDef Set MyField = .CreateField(FieldName, dbLong) MyField.Required = True MyField.OrdinalPosition = 0 .Fields.Append s.Append MyField ' Add Field "MemAddID" at top of table OK Set MyIndex = .CreateIndex(FieldName) Set MyField = MyIndex.CreateField(FieldName) MyIndex.Required = True MyIndex.Unique = True 'MyIndex.Fields.Append MyField MyIndex.Fields.Append MyIndex.CreateField(FieldName) .Indexes.Append MyIndex 'ERROR End With The field is added, but not the index. I get Error 3058 "Index or primary key cannot contain a Null value" There are no indexes in the table What am I doing wrong |
![]() |
| Thread Tools | |
| Display Modes | |
| |