Try DMin() instead of DLookup()
--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users -
http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
"Luis" <(E-Mail Removed)> wrote in message
news:27941884-39B0-4EB7-9FD1-(E-Mail Removed)...
> 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
>