As a further qualification to Wildhare's excellent explanation, here are a couple of other related points, which are a logical extention to the thread:
(a) The bracket based referencing described above, applies equally well to a variety of Access "collections"; for example: controls on Forms or Reports, or fields in Tables or Queries.
(b) On a form for example, assunimg we have a control called txtControl, the following three alternatives do the same thing:
me!txtControl = "Hello World"
me("txtControl"

= "Hello World"
someVariable = "txtControl"
me(SomeVariable) = "Hello World"
(c) If txtControl is the 4th control on the form, then it can also be referenced using its ordinal position in the form's control collection; ie.:
me(3) = "Hello World"
Note the value three above, not four. This is because the first element of the collection has a zero based subscript; you need to get used to this.
(d) The above ordinal position referencing provides a very powerful capability: the ability to move through all of the items in a collection, from start to end, as illustrated below:
for i = 1 to me.count
msgbox me(i-1).name
next i
This will show the names of all controls on a form. Note the (i-1) referencing to allow for the zero based subscripting. An alternative representation could be:
for i = 0 to me.count - 1
msgbox me(i).name
next i
Take your pick.
There are lots of uses for this collection iteration on forms (and also other ways to do it; check out For Each loops for more info). One of my favourite uses is to combine it with usage of the Tag property; eg.
[ff]
Dim F as Form: Set F = me
For i = 0 to F.count - 1
If F(i).tag = "ShowMe" then
F(i).Visible = True
Else
F(i).Visible = False
Endif
Next I
[/ff]
(e) Another example of using the bracket syntax to iterate through a collection of elements of a recordset might be to assign field values to a 'zero based' array elements; for example, assuming a recordset called RS:
For i = 0 to RS.Fields.Count - 1
A(i) = RS(i)
next i
This is obviously a preferable solution to:
A(0) = RS!YourField0
A(1) = RS!YourField1
A(2) = RS!YourField2
... and so on
and becomes the only viable option, if the number of fields in the recordset is large (though I cannot tell you of the number of applications I've had to surf though with hundreds of lines similar to the above, where a simple iteration through the collection would have made life easier for all involved (some developers do have this misguided notion that the longer the program, the cleverer the solution!!).
I'll stop there; hope this helps someone,
Steve Lewy
Solutions Developer
steve@lewycomputing.com.au
(dont cut corners or you'll go round in circles)