|
|
|
date: Sat, 5 Jul 2008 10:27:41 -0700 (PDT),
group: microsoft.public.access.formscoding
back
Re: dlookup
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 MVP
http://I.Am/DougSteele
(no private e-mails, please)
"iccsi" wrote in message
news:ed342b45-75b0-43dc-8f4e-967f4e5e34f4@d1g2000hsg.googlegroups.com...
>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,
date: Sat, 5 Jul 2008 14:14:18 -0400
author: Douglas J. Steele
Re: dlookup
On Jul 5, 2:14 pm, "Douglas J. Steele"
wrote:
> 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)
>
> "iccsi" wrote in message
>
> news:ed342b45-75b0-43dc-8f4e-967f4e5e34f4@d1g2000hsg.googlegroups.com...
>
>
>
> >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,
date: Sat, 5 Jul 2008 18:36:09 -0700 (PDT)
author: iccsi
|
|