Find-method or DLookUp

  • Thread starter Thread starter Niklas Östrergren
  • Start date Start date
N

Niklas Östrergren

Hi!

I know that ther´s a prestandadifference between SEEK method and FIND
method. At least that´s what I have read. But what about FIND methode
compared to DLookUp?

If I have understand it correctly it´s possible to use FIND method in any
type of Recordset. It´s not limited to table recordset like SEEK methode,
or? The reason to my Q is that my db is plitted into (or rather is going to
be) a front end and a back end.

TIA!
// Niklas
 
* DLookup is the least efficient but shortest (VBA) code.

* Seek is probably the most efficient since it uses the index. However, the
difference between Seek & Find(First) is probably unnoticeable unless you
have lots of repetitions.

* You can use Seek on linked Table but need slightly more complex VBA code
(to open the back-end database).
 
OK!

I have hade some simular Q about this isue before but then only asked for
DLookUp and refering to that I think that I shall use DLookUp a little bit
more than I do since I often only need to look up one record and one or a
couple of values for that record. On the other hand I´d like to learn more
about DAO so maby I shall use FIND methode instead.!?

When shall I use DLookUp and when do you think I should use Find/Seek
method. I mean in a lot of cases I can select almost anyone I like since
they actually are doing the same thing, geting the values I need.

TIA!
// Niklas
 
If you look for one value in the Sub / Function, one DLookUp won't make any
difference. Of course, you can also use Find or Seek, just more coding.

However, if you look for one value in a loop (a loop can have numerous
repetitions), use Find or Seek.
 
Thank´s a lot Van T. Dinh.

That gives me some rule to follow! Just what I wanted! :-)

// Niklas
 
Back
Top