[AccessD] Listing open forms

Rocky Smolin - Beach Access Software bchacc at san.rr.com
Sat Mar 12 13:09:06 CST 2005


Steve:

I think AllForms collection may be helpful.  From the Access 2000 (usually 
totally bogus but in this case was actually some) Help:

AllForms Collection Example

The following example prints the name of each open AccessObject object in 
the AllForms collection.

Sub AllForms()
    Dim obj As AccessObject, dbs As Object
    Set dbs = Application.CurrentProject
    ' Search for open AccessObject objects in AllForms collection.
    For Each obj In dbs.AllForms
        If obj.IsLoaded = TRUE then
            ' Print name of obj.
            Debug.Print obj.Name
        End If
    Next obj
End SubYou could use this to create a source for a combo box or a list box 
of all the loaded forms.  I would use .Visible = True and False to hide and 
show the forms.HTHRocky SmolinBeach Access 
Softwarehttp://www.e-z-mrp.com858-259-4334----- Original Message ----- 
From: "Steve Capistrant" <scapistrant at symphonyinfo.com>
To: "Access Developers discussion and problem solving" 
<accessd at databaseadvisors.com>
Sent: Saturday, March 12, 2005 10:19 AM
Subject: [AccessD] Listing open forms


> Gang,
>
> I'm interested in displaying a list of open forms, allowing the user to
> toggle among currently open forms (but not any .  Using the built in
> Windows menu is not an option because it exposes things I don't want the
> user messing with (e.g. Unhide...).   I can alter the built in Windows
> menu to exclude unwanted items, but that is a global setting, affecting
> ALL Access apps.
>
> Option 1.  Create a custom version of the WINDOWS menu on an Access menu
> bar.  But I can't figure out how to reproduce the built in feature; its
> not a fixed "item" on the list with code I can copy.  Also, how would I
> limit the objects to forms only?
>
> Option 2.  Create a popup form, which can be called from any context,
> containing a listbox showing all open forms.  This is my second choice,
> but acceptable if necessary.  I assume it involves looping through the
> forms collection and applying an IsLoaded() function.
>
> Any tips or hints?  Thanks.
>
> Steve Capistrant
> scapistrant at symphonyinfo.com
> Symphony Information Services
> 7308 Aspen Lane North, Suite 132
> Brooklyn Park, MN  55428
> 763-391-7400
> www.symphonyinfo.com
>
>
> -- 
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
> 




More information about the AccessD mailing list