F
Frank Dulk
I Read in some place that is not a good practice to use Me. in the place it
should use Me! Because it will be?
should use Me! Because it will be?
Allen Browne said:Frank, you do whatever suits you.
Personally, I use Me. rather than Me! because Access then offers a list of
the items on the form so I can type faster (it auto-completes the name) and
make fewer spelling mistakes.
More importantly, if there is a mistake (such as something that changed
name), Access picks it up at compile time which it does not with the bang
(!). *Anything* that helps me debug is worth it.
The one case where Me. can cause problems IME is when it refers to a field
in the form's record source that is not represented by a control on the
form. This object is of type AccessField, and there are bugs associated with
this type. Typically everything works fine until one day it decides the name
is now invalid and refuses to compile. I've stuck this rarely, but enough
times that I now use the bang consistently to refer to an AccessField
object.