Dlookup minimum value

  • Thread starter Thread starter Luis
  • Start date Start date
L

Luis

Hello.

I'm trying to use Dlookup to get the minimum date from a table.

I was trying to do the following command:

mDate=Dlookup(min("dateField"),"tblName")

Somehow the code points an error on"Min", saying that "Sub or Function not
defined".

Is it possible what i'm doing? Is there any other way instead of looping
through all the records?

Thanks.
Luis
 
Hi Luis,
to achieve your goal use the dmin function so

mDate=Dmin("dateField","tblName")

HTH Paolo
 
Perfect!
Thank you all.
Luis


JimBurke via AccessMonster.com said:
The first value is supposed to be simply a field name - you can't use an
operation on the field like that. You want to use the DMin function:

mDate=DMin("dateField","tblName")


--
Jim Burke



.
 
Back
Top