Okay, here's the whole picture. Four fields being created and
their display properties being created and set. I received the
error:
3265 Item not found in this collection.
PubCell1 and PubCell2 were created, but not neither of the
two PubEMA1 or PubEMA2. Leading me to believe the
error occurred pertaining to either the creation of the property
or setting of the property for PubCell2.
The four segments of code should be identical except for the
field names, so it's a mystery as to why the 1st field completed
okay while there was any sort of problem with the others????
Note that the dbFailOnError is only coded with the
conBackend.Execute statement. I believe the error
was displayed out of my error handler.
===========(The code)=======================
========(1st field)=========
strDDL = "ALTER TABLE Registry ADD Column PubCell1 YESNO" 'Y/N Okay to
publish Cell1?
conBackend.Execute strDDL, dbFailOnError
Call SetPropertyDAO(CurrentDb.TableDefs("Registry").Fields("PubCell1"),
"DisplayControl", dbInteger, 106)
CurrentDb.TableDefs("Registry").Fields("PubCell1").Properties("DisplayControl")
= CInt(acCheckBox)
========(2nd field)=========
strDDL = "ALTER TABLE Registry ADD Column PubCell2 YESNO" 'Y/N Okay to
publish Cell2?
conBackend.Execute strDDL, dbFailOnError
Call SetPropertyDAO(CurrentDb.TableDefs("Registry").Fields("PubCell2"),
"DisplayControl", dbInteger, 106)
CurrentDb.TableDefs("Registry").Fields("PubCell2").Properties("DisplayControl")
= CInt(acCheckBox)
========(3rd field)=========
strDDL = "ALTER TABLE Registry ADD Column PubEMA1 YESNO" 'Y/N Okay to
publish EMA 1?
conBackend.Execute strDDL, dbFailOnError
Call SetPropertyDAO(CurrentDb.TableDefs("Registry").Fields("PubEMA1"),
"DisplayControl", dbInteger, 106)
CurrentDb.TableDefs("Registry").Fields("PubEMA1").Properties("DisplayControl")
= CInt(acCheckBox)
========(4th field)=========
strDDL = "ALTER TABLE Registry ADD Column PubEMA2 YESNO" 'Y/N Okay to
publish EMA 2?
conBackend.Execute strDDL, dbFailOnError
Call SetPropertyDAO(CurrentDb.TableDefs("Registry").Fields("PubEMA2"),
"DisplayControl", dbInteger, 106)
CurrentDb.TableDefs("Registry").Fields("PubEMA2").Properties("DisplayControl")
= CInt(acCheckBox)
=========================================