Solved

Using Me! versus Me. in Access VBA

Posted on 2010-09-01
6
853 Views
Last Modified: 2012-05-10
I was once told that when accessing Access controls, whether unbound or bound, it is preferred to use Me!, as opposed to Me. . Yet, when using Me. for unbound or bound controls, VBA does recognize the control name.

Is there a rule of thumb to follow?

Thanks.
0
Comment
Question by:newbie46
  • 4
6 Comments
 
LVL 75

Accepted Solution

by:
DatabaseMX (Joe Anderson - Access MVP) earned 250 total points
ID: 33583340
You are in luck.  The Definitive Document has just been almost finalized:

http://www.experts-exchange.com/Microsoft/Development/MS_Access/Q_26420505.html?cid=748#a33571144

See this post near the bottom:

 LPurvis:
09.01.2010 at 05:03AM PDT, ID: 33575882

Much better. Small comments attached. (The document page setup is always way too narrow for me to read the wide tables when I receive it - just thought I'd mention that here).
             
DBPQ.Rev1LP.doc (52 KB) (File Type Details)

****

EVERYTHING ... you need to know about this subject is spelled out in the Doc.  Read thoroughly.

mx
0
 
LVL 75
ID: 33583345
"it is preferred to use Me!, '

Not really the case ... as you will see in the link I posted above.

DOT allows Intellisense to expose the control names because of Early Binding, BANG does not.

As you will see, there are very few places where Bang is necessary.

mx
0
 
LVL 30

Assisted Solution

by:Brad Howe
Brad Howe earned 250 total points
ID: 33583364
Hi,
I know Me! refers to an object and Me. refers to a property. Now when to use them varies, they both work in either format.
Here are some good articles on the subject.
http://bytes.com/topic/access/insights/620587-control-object-reference-me
 http://blogs.msdn.com/b/access/archive/2008/05/30/dot-or-bang.aspx
Cheers, Hades666
0
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 
LVL 75
ID: 33583455
hades666:  I highly recommend you read the Doc in the EE link I posted.  Your comment is not quite accurate.  The document was edited by Leigh Purvis, one of been minds in the entire Access World.

mx
0
 
LVL 57
ID: 33585345
Using Bang is the old way, dot the new way (and is faster).  I still use bang out of habit.
JimD.
0
 
LVL 75
ID: 33589127
JD ... I suggest reading the doc that Leigh and Miles put together.  It's pretty darn good and covers every case :-)

mx
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now