Dlookup and DMax and DCount

  • Thread starter Thread starter nybaseball22
  • Start date Start date
N

nybaseball22

Hello. I have a subform that I am trying to have count the number of
records in a query and then list the top two items in text boxes. I
have tried to use a DMax and Dlookup function, but nothing seems to
work. Does anyone have any idea how I might get this to work?

Thanks
 
Write a query that sorts on the column that you consider to have the top 2
items, using the TOP predicate in your query, like:

SELECT TOP 2 DateRcvd, MemberName, Amount
FROM tblPayment
ORDER BY DateRcvd DESC;

Use that query as the recordsource of your subform.
 
Back
Top