[AccessD] Dlookups. your opinion please.

Darren D darren at activebilling.com.au
Mon Sep 22 23:53:38 CDT 2008


Hi Dazza

I agree with the other comments - DLookUps are OK - I use 'em quite a bit
because I am too lazy to write proper "with rs" loops. And personally won't
bother if I can get...

strCompanyName = Dlookup("[CompanyName]", "tblOptions")

to do what I require - Like Stuart said - Put something like that in a variable
at some 'loading' or 'starting' place then refer to the variable rather than
continually performing and re-performing the lookup

But as mentioned - A whole swag of 'em can slow things a bit. Also avoid doing
any DLookups in loops

See ya

Dazza2

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Darryl Collins
Sent: Tuesday, 23 September 2008 1:54 PM
To: 'Access Developers discussion and problem solving'
Subject: [AccessD] Dlookups. your opinion please.

Hi All,

I have, ummm, inherited a database (SQL Server Back, Access Front) at work.
Frankly this thing is a disaster waiting to happen and since the guy who built
has left (he used to admin it, and I suspect there were regular band aid repairs
and updates to keep it all steady) the actual users are having no end of bother
and bugs with it.  anyway, I digress...

The code is full of DLookups, something which I have not felt the need to use
ever.  I think I read somewhere that using lots of dlookups is a bad idea.
Anyway. What is your opinion on using them?  If they are fine and no bother then
I am happy to leave them in the code (at least for now).  But if they are known
to be bothersome then I am more than happy to get rid of them and use something
better.

this thing just gets more and more ugly.  Nearly everything in the VBA code is
dimmed as a string and they are wondering why the numeric fields are not
populating correctly.  messy messy messy.  I can see someone in the past has
figured out that was a bad idea and redimmed some stuff as double. But they have
left the code like this
"Dim strMyVariable as Double" which is a right PITA when debugging. And the
whole show is being driven client side from Access, rather than server side from
SQL Server... Sorry about the rant...

cheers and get me another scotch!
darryl.



This email and any attachments may contain privileged and confidential
information
and are intended for the named addressee only. If you have received this e-mail
in
error, please notify the sender and delete this e-mail immediately. Any
confidentiality, privilege or copyright is not waived or lost because this
e-mail
has been sent to you in error. It is your responsibility to check this e-mail
and
any attachments for viruses.  No warranty is made that this material is free
from
computer virus or any other defect or error.  Any loss/damage incurred by using
this
material is not the sender's responsibility.  The sender's entire liability will
be
limited to resupplying the material.


-- 
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