dlookup

  • Thread starter Thread starter iccsi
  • Start date Start date
I

iccsi

I have following data

MyCode MyValue

A 1
B 2
C 3
D 4
E 0

I just wonder if I use Dlookup("[MyCode]","MyTable", "[MyValue] <= "
3)
which record will return A, B or C or unknonw?


Because A, B and C are less or equal 3, does Dlookup return the most
close one "C"?
If I use MyValue < 3 then returns "B" or any one less then 3?


Your information is great appreciated,
 
It will return one of the three values. Which one, however, is essentially
unknown and depends on a number of things.

If you want it to always return C (the highest value), use DMax instead of
DLookup. If you want it to always return A (the lowest value), use DMin.
(There's no way to have it reliably return B)
 
It will return one of the three values. Which one, however, is essentially
unknown and depends on a number of things.

If you want it to always return C (the highest value), use DMax instead of
DLookup. If you want it to always return A (the lowest value), use DMin.
(There's no way to have it reliably return B)

--
Doug Steele, Microsoft Access MVPhttp://I.Am/DougSteele
(no private e-mails, please)




I have following data
MyCode  MyValue
 A         1
 B         2
 C         3
 D         4
 E         0
I just wonder if I use Dlookup("[MyCode]","MyTable", "[MyValue] <= "
3)
which record will return A, B or C  or unknonw?
Because A, B and C are less or equal 3, does Dlookup return the most
close one "C"?
If I use MyValue < 3 then returns "B" or any one less then 3?
Your information is great appreciated,- Hide quoted text -

- Show quoted text -

Thanks millions,
 
Back
Top