Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dlookup Question - Adding Max Lookup 1

Status
Not open for further replies.

FontanaS

Programmer
May 1, 2001
357
US
I have the following code in a text field on the report

=DLookUp("[DataIssued]","AmendmentA","[AACETaskID] = " & [TaskID])

It works fine. I would like to get the earliest date and not the first one found.

I tried to add MIN but I got errors -
=DLookUp("Min[DataIssued]","AmendmentA","[AACETaskID] = " & [TaskID])

THANKS!
 
=DMin("[DataIssued]","AmendmentA","[AACETaskID] = " & [TaskID])

to pick up the minimum date, DMax for the last, DCount for number of records etc. These domain aggregate functions are very useful.

John
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top