Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Form Control Sources

Status
Not open for further replies.

Netherby

Programmer
Nov 9, 2001
32
GB
Hi,

I have a piece of code that lets me use one database, MyDB1, to look at a second database, MyDB2, and then allows me to get various field properties such as field type, validation rule, validation text, etc. What I do is:

Set db = DAO.DBEngine(0).OpenDatabase(".......\MyDB2.mdb")
Set tdf = db.TableDefs("Table1")
For Each fld In tdf.Fields
I ask for the info I need in this loop.
Next

It all works well and I would like to be able to do something similar for forms whereby I can use MyDB1 to get information for each control on a form such as control name, control source, etc. I can do this all within MyDB2 if I manulally open the form but what I really want to do is do it all from MyDB1.

The reason why I want to work this way is to develop a documentation database that I can use for all my databases.

Any help would be much appreciated.

Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top