473,322 Members | 1,409 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Difference between dot and bang notation?

What is the difference between

Me.Lastname
Me!Lastname

TIA

Feb 16 '07 #1
4 14670
On Feb 16, 10:02 am, "Richard" <richard.goo...@devenezia.comwrote:
What is the difference between

Me.Lastname
Me!Lastname

TIA

The difference ultimately is where you use them and for what
reference. You can't reference a property or method with ! - just
objects. I have seen a lot of opinion about which is better used
where, but the practise I follow is...

- ! for an internal control reference. Eg. Code in a form module
refering to a control on the same form. - Me!Lastname
- . for an external reference and for properties and methods. Eg. in a
standard module - Forms("frmName").LastName.Visible

Feb 16 '07 #2
Richard wrote:
What is the difference between

Me.Lastname
Me!Lastname
In my own opinion, ultimately, the use of the dot lets you harness the
intellisense from the VBA which makes things much easier for code writing.

I've never had any problem using it.
--
Tim http://www.ucs.mun.ca/~tmarshal/
^o<
/#) "Burp-beep, burp-beep, burp-beep?" - Quaker Jake
/^^ "Be Careful, Big Bird!" - Ditto "TIM-MAY!!" - Me
Feb 16 '07 #3
"Richard" <ri************@devenezia.comwrote in
news:11**********************@t69g2000cwt.googlegr oups.com:
What is the difference between

Me.Lastname
Me!Lastname

TIA
In theory, the dot refers to a property of an object, The bang
refers to a member of a collection.

In practice, controls on a form are considered like properties,
even though they are members of the form/report's controls
collection.

Use the dot except when it doesn't work About the only place I
can think of where it doesn't work is in a recordset when
referring to the fields by name.

rs1.fields("myField") and rs1!myfield will work.
rs1.myfield will trigger an error.

--
Bob Quintal

PA is y I've altered my email address.

--
Posted via a free Usenet account from http://www.teranews.com

Feb 16 '07 #4
PW
On 16 Feb 2007 07:11:54 -0800, "storrboy" <st******@sympatico.ca>
wrote:
>On Feb 16, 10:02 am, "Richard" <richard.goo...@devenezia.comwrote:
>What is the difference between

Me.Lastname
Me!Lastname

TIA


The difference ultimately is where you use them and for what
reference. You can't reference a property or method with ! - just
objects. I have seen a lot of opinion about which is better used
where, but the practise I follow is...

- ! for an internal control reference. Eg. Code in a form module
refering to a control on the same form. - Me!Lastname
- . for an external reference and for properties and methods. Eg. in a
standard module - Forms("frmName").LastName.Visible

That's funny. I do the complete opposite of both those scenarios!

When I am writing code and want to reference a control on a form,
Access 2003 automatically locates the control if I type "dot" after Me
(Me.txtStartDate).

-pw
Feb 19 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

14
by: Edward Diener | last post by:
In the tutorial on functions there are sections on default arguments and keyword arguments, yet I don't see the syntactic difference between them. For default arguments the tutorial shows: def...
3
by: deko | last post by:
all this dot and bang syntax is confusing. if anyone can bring clarity to this subject I would really appreciate it. Forms!!.Form! -- to reference a text box on a subform But is this the...
22
by: Keith Tizzard | last post by:
I know this subject has been discussed many times and I do not wish to go over all the ground again but I have a particular problem. In the code for a Form I always use the dot notation to refer...
44
by: Darryl Kerkeslager | last post by:
I once did all my control references with the bang (!) operator. All my controls were referenced as Me!txtInput, etc. I have now discovered that doing this loses much more than Intellisense. ...
10
by: David | last post by:
what's the differences between: int main(int argc,char* argv){ ... } and: int main(int argc,char** argv){ ...
4
by: mosimu | last post by:
I have never fully understood what the difference is between these two forms of casting. Can anyone please clarify? long is a primitive data type so no, it's not calling a class constructor. ...
34
by: arnuld | last post by:
what is the difference between these 2: char name = "hackers"; char* name = "hackers";
6
by: =?Utf-8?B?UmljaA==?= | last post by:
If Not st1.Equals("something") then Do Something Else End If if str1 != "something" Then ... I realize that != is C# stuff and/or can be also be used in Tsql, but is there any implementation...
11
by: YZXIA | last post by:
Is there any difference between explicit inner join and implicit inner join Example of an explicit inner join: SELECT * FROM employee INNER JOIN department ON employee.DepartmentID =...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.