[AccessD] Whilst on DLOOKUPs....

Rocky Smolin rockysmolin at bchacc.com
Mon May 9 19:43:47 CDT 2011


I was warned off them when I first joined this list in A97 days - all domain
functions actually because they were so much slower than opening a recordset
either filtered or using FindFirst to get a value, and then closing it. 

I use them now to look up things in local tables or on linked tables in
places in the code where I know it will not be in a loop with lots of
iterations - like retrieving a value from a preferences table.

Rocky


-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Darryl Collins
Sent: Monday, May 09, 2011 5:18 PM
To: Access Developers discussion and problem solving
Subject: [AccessD] Whilst on DLOOKUPs....


____________________________________________________________________________
___________

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


Hi Folks,

A database I have been given to work on uses a lot of DLOOKUPs (hundreds).
Personally I don't like them much and prefer to write SELECT SQL statements
or a neat little function to get values back from a table.  I do this as
these methods are more flexible and easier to read and debug compated to
DLOOKUP.  Using recordsets to get data also seems to be as fast as using
DLOOKUP, although given the speed of today's processors I am not sure it is
something a human would notice anyway.

The DLOOKUP is a short piece of code, but harder to read, or at least I find
it harder (often because the DLOOKUP is a long string make up of variables
and often extent outside the visibile VBE window.

I recall reading somewhere that there are issues when using a lot of
DLOOKUPs, of course I could dreaming as well.

I know Allan Browne has identified some issues, these alone would make me
nervous about using DLOOKUP so I am happy not to bother with them.
<<http://allenbrowne.com/ser-42.html>>

However, curious to know what your opinion is of them.  Do I have an
attitude problem as they fast, useful and reliable or is my reluctance
worthwhile as DLOOKUP is something best to be used sparingly and with some
caution?

Cheers
Darryl.

_____________________________________

Darryl Collins | Business Analyst Database Developer Retail Business
Insurance Insurance Australia Group (IAG) Level 2, 181 Williams St,
Melbourne, 3000 - Australia
Ph: + 61 3 9916 3926
Mobile: + 61 418 381 548



____________________________________________________________________________
___________

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.
____________________________________________________________________________
___________
--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com




More information about the AccessD mailing list