DLookup too slow?

supmktg

Registered User.
Local time
Today, 13:42
Joined
Mar 25, 2002
Messages
360
Hi All,

I'm using DLookup (several of them) to populate some text and image boxes on a form. The form takes too long to load. I'm still a novice at vba code, would a recordset find method be faster than DLookup?
Are there better ways besides these two?
I'm comfortable with DLookup, I've never used the recordset findmethod.

Thanks for your advice,

supmktg

(Using A2K)
 
1- How many Dlookups are you using?
2- How many records are in the tables being used to feed those Dlookups?
3- How fast does the form load without the Dlookups?
4- Perhaps the images are slowing down the form load as well?

Using a recordset method (i.e., ADO) can be faster, but it all depends on the above.
 
Do you have to use DLookups? Can you not use a query to populate the form and pull the info into the query from multiple tables?
 
So far I'm using 2 DLookups, but if I keep going I'll probably end up with 4 or 5.

One table, the one with the (linked) image path only has 500 records. The other has 8300 records.

The form loads fast ( but not instantly ) without either of the DLookups. Each DLookup slows the form load equally and together they make the form feel amaturish (which I guess it is). I'm trying to find a way to improve performance, and at the same time improve my skills.

The images are unneccesary, but again, I'm trying to make the form look impressive.

Based on Fizzo's recommendation, I'm going to filter the tables using a query first, and then do the DLookup on a smaller set of records to see if that speeds things up.

Thanks,

supmktg
 
That wasn't Fizzio's suggestion. His suggestion was to base the form on a query that joins the main table to the lookup tables. Join processing is far more efficient than Delookup().

Once you create the query with the join, change the recordsource of the form to point to that query rather than directly to the table. Then change the controlsources of the lookup fields to pull from the fields listed in the field list box.
 
supmktg, I agree with the others in that you should, in general, do what you can to avoid using Dlookups.
 

Users who are viewing this thread

Back
Top Bottom