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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

transfering groups of database objects 1

Status
Not open for further replies.

grnfvr

MIS
Dec 21, 2000
111
US
I am trying to figure out how to write code to transfer all of a database's objects (tbl,qry,frm,rep,mcr,mod) to another database.

I have been able to do this with tables and queries by looping through each object definition(tabledef, querydef) in the respective class for each objecttype(tables & queries).

I haven't figured out a way to accomplish this with the other database objects. Any Ideas?
 
how do i get come up with the collection to iterate through?
 
I'm interested in this one too. I can list the tables/queries/forms/reports and modules (but not the macros), with this code (changing Forms to Tables etc..). This is only half an answer, and using tables lists ALL the tables, and the queries:

Function NameObjs()

Dim docLoop As Document
Dim dbs As Database

Set dbs = CurrentDb

With dbs.Containers!Forms

For Each docLoop In .Documents
MsgBox docLoop.Name
Next docLoop

End With


End Function
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top