listing open forms

  • Thread starter Thread starter Kevin S.
  • Start date Start date
K

Kevin S.

Does anybody know how to list all open forms in a listbox? Or a
database/site that can show me how? Im using Access 2002.

I've tried looking at the sample in the Solutions database that comes with
Access 97, but after an hour or two of trying to get that to work, I gave
up. (it lists all records open in the same form but different windows... I
actually want every form thats open because my database doesn't need two
copies of a form running)

Thanks for any help... I can't get it to work at all.
Guessing... do I need to use a collection? The sample 97 db does.

-Kevin
 
The collection of open forms is accessible through the
Forms collection so you sould try something along the
following lines

Dim frm as Access.Form
Dim strRowSource as String

For Each frm in Forms
strRowSource = strRowSource & frm.Name & ";"
Next

List0.RowSource = Left(strRowSource, Len(strRowSource)-1)
List0.RowSourceType = "Value List"

Hope This Helps
Gerald Stanley MCSD
 
Back
Top