[AccessD] How explicit do you need to be?

Darryl Collins Darryl.Collins at iag.com.au
Sun May 2 23:38:48 CDT 2010


_______________________________________________________________________________________

Note: This e-mail is subject to the disclaimer contained at the bottom of this message.
_______________________________________________________________________________________


Hi Folks,

Finally back on the list after changing roles.
Curious about this.
Personally I have always been very precise with references etc as it seems to improve performance and reliability.  However, does it really matter that much?
For example what are the advantages and/risk of using the following syntax

x = txtMyTextBox  VS  x = me.txtMyTextBox.value

Or

txtFarm.Visible = False
lblFarm.Visible = False
txtHire.Visible = True
lblHire.Visible = True

VS

With me
        .txtFarm.Visible = False
        .lblFarm.Visible = False
        .txtHire.Visible = True
       .lblHire.Visible = True
End with

I would normally always use the longer syntax, although for typing reasons I can see the appeal of the shorter style.  In the case of the first example, I guess the .value is the default so that is probably redundant, although I like the way it is clear exactly what it is you are looking at/for.

So what would be considered 'best (or better) practice' with coding for this example?  Or more importantly, which style will return the results faster and reliably?

Cheers
Darryl.

_____________________________________

Darryl Collins | Database Developer
Insurance Australia Group
+ 61 3 9916 3926 (Desk)
+ 61 418 381 548 (Mobile)



_______________________________________________________________________________________

The information transmitted in this message and its attachments (if any) is intended 
only for the person or entity to which it is addressed.
The message may contain confidential and/or privileged material. Any review, 
retransmission, dissemination or other use of, or taking of any action in reliance 
upon this information, by persons or entities other than the intended recipient is 
prohibited.

If you have received this in error, please contact the sender and delete this e-mail 
and associated material from any computer.

The intended recipient of this e-mail may only use, reproduce, disclose or distribute 
the information contained in this e-mail and any attached files, with the permission 
of the sender.

This message has been scanned for viruses.
_______________________________________________________________________________________



More information about the AccessD mailing list