learned there are several ways to use the ME syntax... Like Me.(control), Me.[Control] and the one that worked Me("control") without the Dot after Me.
If interested here is the explanation. It is not related just to the "Me" syntax but general VBA syntax. VBA and VB tried to be too flexible that it actually causes more confusion than helps IMO.
1) There are two types of syntax Dot and Bang when working with collections. So for example the forms collection can be referenced like this using Dot
Forms(1) using the numbered index
or
Forms("YourFormName") using the named index
or with a variable
dim frmName as string
frmName = "MyForm"
Forms(frmName)
Using Bang you can just do this
Forms!YourFormName
can not use a variable and do not use ""
2) If there is a space or reserved word you need to wrap it in [], and you can always do it if you want.
dot
Forms("My Form") no need for brackets since in ""
Forms![My Form] need brackets
me.[txt box1] need brackets
me.controls("txt box1") no need for brackets
me.[txtBxOne] no need for brackets but still works
3) To add to the confusion there are vba/vb deault methods and properties. If it is a default you do not have to do use it, but you can
For the controls collection on a form the full syntax is
me.controls.item("controlName")
however the "item" property is the default property for any collection so you can just drop it
me.controls("controlName")
and the controls collection is the default property of a form so you can drop that
me("controlName")
4) Access has a couple of even more confusing things
When you add a control to a form it makes it both a property of a form and adds it to the controls collection
so you can reference the control directly as a property
me.TxtBoxOne
or through the controls collection
me.controls("txtBoxOne")
Also a lot of times you have a field and a control with the same name and Access does not care.
Me.UserID can either be the control or the field, but figures it out by context
So for your specific issue a form has Sections such as the Detail Section. I could write the following and all are the same
Me.Section.item("Detail").name
Me.Section("Detail").name
Me.Section!Detail.name
Me.Section(1).name
if Your section was named "My Section"
Me.Section("My Section")
Me.Section![My Section]
But since you were using the reserved word section as a name of a control that was not a section object
Me.Controls.item("Section")
me.controls("section")
me("Section")
But you cannot do what you tried because
Me.Section expects an argument to follow such as Me.Section(1) or me.Section("Detail")
But bottom line never use spaces and use a naming convention to avoid using reserved words. You will not get any warning in vba that the word is reserved. So instead of Section use something like txtBxSection for the text box.