place it should use Me!

  • Thread starter Thread starter Frank Dulk
  • Start date Start date
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?
 
Thank you Allen

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.
 
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Where've you bin? 7
Excel Protection 2
A Speech 2
Access Create option group without using wizard? 2
Are my CPU temps normal? 1
Email Bounce Error 3
Show me your highest mileage HDD? 0
Access stripping decimal places in query 1

Back
Top