
Collections, Collections and More Collections
Hi all. I have a question to which, hopefully, the answer is "Yes". I have
a database that I have added a custom property to. This property cotains a
path that is used to refresh links to the data tables in another Access DB.
I did this so I can easily change the data source between Production, QA
and Development. Here is a fully qualified example to return the path
(DataInfoSource is the name of the custom property):
Dim db as Database
Dim str as String
Set db = CurrentDb
str = db.Properties("DataInfoSource").Value
Debug.Print str
The Immediate Pane will display the value of DataInfoSource (eg.
"\\server_qa\sys\users\dbs\datSecMk.mdb" if in QA,
"\\server_prod\sys\users\dbs\datSecMk.mdb" if in Production). The bottom
line is I use a form to change the property and then refresh the table
links.
Now to my question... Can you a custom Collection to a Database object like
you can add a custom Property? I want to do something like the following:
db.Properties(20).Imports(0).Elements(0).RcptTable
Where RcptTable is a custom Property of Element
Element is an Item in the Elements Collection
Elements is a Collection and a custom Property of Import
Import is an Item in the Imports Collection
Imports is a Collection and a custom Property of Properties
Properties is a Collection and a Property of Database
Database is the Current Database
I know I don't want much (ha, ha) but maybe someone out there has done
something similar. Thanks, in advance for any assistance.