Which is Faster: passthru qry or DLookup() (1 Viewer)

craigachan

Registered User.
Local time
Yesterday, 23:48
Joined
Nov 9, 2007
Messages
282
I'm just wondering, which is faster to fill a form. To call info from a query or to DLookup the table/Qry?

Any input is appreciated.
 

Brianwarnock

Retired
Local time
Today, 07:48
Joined
Jun 2, 2003
Messages
12,701
I don't have anyway of knowing but my money is on the query as access help on Dlookup says that it is quicker to join 2 tables than to use Dlookup.

Brian
 

namliam

The Mailman - AWF VIP
Local time
Today, 08:48
Joined
Aug 11, 2003
Messages
11,695
Query definatly! Using the query you can fetch multiple fields at ones, DLookup only allows 1 field/lookup...
 

Rabbie

Super Moderator
Local time
Today, 07:48
Joined
Jul 10, 2007
Messages
5,906
Dlookups are slow because they look at every record in the selected table to see if the criteria are met each time it is evaluated. So uf the table is on a different PC/server then an awful lot of data is passed across.

A passthru query is passed to the remote computer and only the records that match the croteria are passed back so much less data transferred.
 

craigachan

Registered User.
Local time
Yesterday, 23:48
Joined
Nov 9, 2007
Messages
282
Thanks for the input. I have some forms that are performing real slow. I'll have to consider what is wrong.
 

Users who are viewing this thread

Top Bottom