- Local time
- Tomorrow, 01:42
- Joined
- Jan 20, 2009
- Messages
- 12,895
But controls of a form are properties of that form: Property Let and Property Get functions that return or take an object.
In the first instance the controls on a form are items in the Controls Collection. They are then exposed as properties of the form. This is quite similar to a private collection exposed as properties of a custom class in VBA using Property Let and Get. The difference is these workings in the Access Form Class are not visible.
Fields and collections are a special case (annoyingly so - they could be accessible by dots if MS had allowed it - as they can be in some cases).
In the case of the DAO 3.6 recordset object model, items in the field collection have not been exposed as properties so can only be referred to with the bang. As you say, maybe it would have been nice of Microsoft to do so. ChrisO's earlier post suggests it had been in DAO 2.5/3.5
However Collections of the Access Form Class object are exposed as a property. Otherwise Me.Controls("controlname") would not work. Maybe it is different in VB.
The best argument for sticking with dots whereever possible is they work with Intellisense and bangs don't. I think that is a bigger pity. It would be very useful if Intellisense showed objects when a bang was used.