[AccessD] Whilst on DLOOKUPs....

Gustav Brock Gustav at cactus.dk
Tue May 10 08:43:41 CDT 2011


Hi Darryl

I've never had any issue with DLookup, and it is not true that it is slow. It can be slow, but so can opening and searching a recordset be. Indeed in reports, speed often is of minor importance.

That said, I don't use it that much, but here and there it provides a quick and simple solution. Like everything else it can be abused, and that seems to be the case in your application.

/gustav


>>> Darryl.Collins at iag.com.au 10-05-2011 02:18 >>>

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






More information about the AccessD mailing list