Not myself, I've never used the long hand,
except for using variables, in field names.
For x = 1 to 10
rec("txtDate" & x) = #3/3/06#
rec.Update
rec.Move...
....and yes, that's what I consider, "long version"(LOL).
Just for the record, YOUR long version, is
more often called "Explicit Referencing", as opposed to
"Implicit",
Because it makes reference to each object hierarchy,
before the control name.
You question compares apples to oranges. You addressed the use of Bang vs Dot and the use of default properties. Regardless if you use Bang or Dot notation, the default property for a field is "value" so you do not need value. The default value for a recordset is "Fields" collection so you do not need "fields"
So in Dot the following are equivalent:
rsPRCheck.Fields("Earnings").VALUE
rsPRCheck.Fields("Earnings")
rsPRCheck("Earnings")
In Bang the following are equivalent:
rsPRCheck.fields!Earnings.value
rsPRCheck.fields!Earnings
rsPRCheck!Earnings
So both notations have a shorthand. This will open a can of worms, but I believe that if you want to avoid corruption and make yourself clear use Dot notation and long hand. There is a good discussion by Litwin and Getz why Bang notation can lead to problems; however, most people use bang and shorthand. And many people will swear by it.
Thank you guys for replying so quickly. Laast night I tried to submit a star for Zion7 but the function is not working. I tried again right now for Zion7 and you but still no go. As soon as it's working again I will submit stars for sure!
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.