{Mod Comment - This was moved here as it developed into a discussion that was extra to what was required for the original question, which can be found at Is it Possible to Reference a SubForm in DoCmd.SearchFor Record?}
OK,
I guess....
Back from the deep dark recesses of my mind back to the 1997
IMHO they fixed this in the 2003 wherein the dot and bang appear to cover the same ground in that controls are now expressed as properties of the form unless a reserved word is used as a control or a bound field name and that name is used as a property of the form, i.e. "name," in which case you really have to use the bang to get the right return (YAR not to use reserved names and special characters and anything except alphanumerics and reserved words).
SO, if I remember right from my classes: dot = property, bang = member of collection.
So using that concept we build the generic reference:
SO to move on to what I coded (still generic reference):
I think that in English I'm saying:
In the collection of "FORMS"
find the item "frmMainPar ent"
within the collections of "frmMainPar ent"
find the item "sFrmSubFor m"
that has a property "FORM"
that has a property "Recordset"
that has a property "FindFirst"
that requires a agument [conditional string] that acts on this described object.
Make me head hurt... I go watch pretty colours lab now...
OK,
I guess....
Back from the deep dark recesses of my mind back to the 1997
IMHO they fixed this in the 2003 wherein the dot and bang appear to cover the same ground in that controls are now expressed as properties of the form unless a reserved word is used as a control or a bound field name and that name is used as a property of the form, i.e. "name," in which case you really have to use the bang to get the right return (YAR not to use reserved names and special characters and anything except alphanumerics and reserved words).
SO, if I remember right from my classes: dot = property, bang = member of collection.
So using that concept we build the generic reference:
Form!frmMainPar ent!sFrmSubForm .FORM!control_o r_recordfield_n ameSO to move on to what I coded (still generic reference):
Form!frmMainPar ent!sFrmSubForm .FORM.Recordset .FindFirst [conditional string]I think that in English I'm saying:
In the collection of "FORMS"
find the item "frmMainPar ent"
within the collections of "frmMainPar ent"
find the item "sFrmSubFor m"
that has a property "FORM"
that has a property "Recordset"
that has a property "FindFirst"
that requires a agument [conditional string] that acts on this described object.
Make me head hurt... I go watch pretty colours lab now...
Comment