Results 1 to 2 of 2
  1. #1
    Access_Novice is offline Competent Performer
    Windows 7 64bit Access 2013
    Join Date
    Sep 2013
    Posts
    265

    Forms collection vs. AllForms collection

    The forms collection refers to all forms which are currently open. Then I presume this means that the AllForms collection refers to all forms, opened or closed. Is this correct?

    Also, is there any reason why a person might write some code referencing a form that is closed, meaning they would not reference the Forms collection?



    When and why would somebody use the AllForms collection when referring to a specific form, instead of using the Forms collection when referencing a specific form?

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,926
    One example:
    Code:
    Private Sub Form_Current()
    With Me
    If CurrentProject.AllForms("DataBituminous").IsLoaded Then
        If IsNull(![AGGBULK]) Then ![AGGBULK] = Forms!DataBituminous![610.AGGBULK]
        If IsNull(![EFFECTIVE]) Then ![EFFECTIVE] = Forms!DataBituminous![610.EFFECTIVE]
    End If
    End With
    End Sub
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Cycle through collection
    By Ruegen in forum Programming
    Replies: 2
    Last Post: 11-19-2014, 04:50 PM
  2. DVD Collection Database
    By I R Foof in forum Access
    Replies: 7
    Last Post: 07-17-2014, 06:52 PM
  3. Replies: 3
    Last Post: 11-16-2012, 10:15 AM
  4. Fields Collection
    By crowegreg in forum Programming
    Replies: 1
    Last Post: 06-02-2011, 05:13 PM
  5. Collection function
    By ATLANTA in forum Programming
    Replies: 2
    Last Post: 04-17-2011, 04:11 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums