Since rs("MyField")
is a Field object, if you do ...
MsgBox TypeName(rs("MyField"))
... Access will tell you its type is Field.
So TypeName()
is one example where the object itself is referenced directly instead of its default .Value
property.
But something like Debug.Print
always references .Value
, so Debug.Print rs("MyField")
is the same as Debug.Print rs("MyField").Value
If you know exactly when .Value
will be referenced implicitly and when it will not, you can add it only when absolutely required and omit it the rest of the time.
However, some Access developers recommend always including .Value
to avoid such confusion. If that seems like too much effort to you, at least consider including .Value
when you do any assignment ...
something = rs("MyField").Value
... and be watchful for any other contexts where you don't get what you want without .Value