G
Guest
I am trying to delete some table relationships in my backend database so that
I can rework the key fields. This all happens for the user at startup. Three
of the four different table relationships are deleted with no error but the
fourth generates an "Item Not Found in the Collection" error. My code is as
follows:
Set dblink = DBEngine(0).OpenDatabase(strDBPath)
dblink.Relations.Delete "TableATableB"
The item is in the collection. If you go to Tools/Relationships in the
back-end db the relationship can be seen. The relationship is functioning and
the Tools/Analyze/Documenter function shows that the name is correct. If I
loop through the Relations collection this too shows the name to be correct.
If I use the Relationship tool to delete the relationship and then re-create
it everything works fine. What's happening here? Thanks.
I can rework the key fields. This all happens for the user at startup. Three
of the four different table relationships are deleted with no error but the
fourth generates an "Item Not Found in the Collection" error. My code is as
follows:
Set dblink = DBEngine(0).OpenDatabase(strDBPath)
dblink.Relations.Delete "TableATableB"
The item is in the collection. If you go to Tools/Relationships in the
back-end db the relationship can be seen. The relationship is functioning and
the Tools/Analyze/Documenter function shows that the name is correct. If I
loop through the Relations collection this too shows the name to be correct.
If I use the Relationship tool to delete the relationship and then re-create
it everything works fine. What's happening here? Thanks.