Tag Archives: Collections

Loops – For Each

In this blog post we will be explaining the For…Each loop and providing some examples of its usage. Demonstrating The For Each Loop with An Array We can use the For Each loop over a standard array. Sub forEachArray()          Dim element As Variant     Dim animals(0 To 5) As String     ‘We […]

Working With Form Objects

In this blog post we will be taking a look at how you can work with form objects in MS Access. Using the collection Controls of a form, all controls can be cycled through and only those of a particular type can be targeted.  In the following example all controls of the form are checked […]


In this blog post we will be discussing collections and how they can be used in VBA. Sub carParts()     ‘A collection is an object that has the ability     ‘to store other objects.     ‘     ‘Collections have 4 methods:     ‘Add: Used to add an item to the collection     ‘Remove: Used to […]