[AccessD] Open a form and find a record

DWUTKA at marlow.com DWUTKA at marlow.com
Wed Oct 27 09:50:42 CDT 2004


It is slow, though in a single use function, it isn't noticable.  Put it in
a big loop, or use it all over in a report, and you'll notice delays.

Drew

-----Original Message-----
From: Gustav Brock [mailto:gustav at cactus.dk]
Sent: Tuesday, October 19, 2004 4:05 AM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] Open a form and find a record


Hi Donald and Susan

It's an old and persistent rumour that DLookup is always slow. Quite
often it is not. So, Susan, give it a try - it's extremely simple and
in a minute your problem will be solved and you can move on to the
more funny tasks.

By the way, the code could be simplified even further:

  strCriteria ="[QAFName]='" & Me![UsersName] & "'"
  If IsNull(Dlookup("[ProjectID]", "tblProjects", strCriteria)) Then
    MsgBox "You are not the QA on any projects."
  Else
    ' Open form ...
  End If

/gustav


> Well, I don't have to worry much about portability issues, but I'd be
> interested in the opinions of folks better versed than I in the area of
> optimization.  I was under the impression that a simple one-time call to
> a domain function in a case like this is no big deal in terms of speed.
> (I suppose it depends on the size of the table.)  I do avoid using them
> in iterative processes, however.  

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