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

get database info of one db from another db

Status
Not open for further replies.

Crowley16

Technical User
Jan 21, 2004
6,931
GB
Hi everyone

I'm trying to access the forms and controls collections of one access database from another access database but am having trouble getting the forms objects...

what I currently have is:
Code:
   If Right(dbPath, 3) Like "md*" Then
      Set db = OpenDatabase(dbPath)
   ElseIf Right(dbPath, 3) Like "ad*" Then
      Set app = CreateObject("Access.Application")
      Set db = app.OpenAccessProject(dbPath)
   Else
      MsgBox "Must specify an Access database!"
   End If

   For Each frm In db.Containers(1)
      Debug.Print frm
   Next frm

however I can't seem to get at the forms collection or the controls collection...

any ideas anyone?

Thanks

--------------------
Procrastinate Now!
 
you may try this:
For Each frm In db.Containers([!]2[/!])

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
errors with: operation not supported with this type of object...

--------------------
Procrastinate Now!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top