Latest Date in Table using Query

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I will appreciate somebody can help on the following

I have two tabled called Visit and VisitDetail - Master and Child

VisitDetail Table Fileds - CustomerID,VisitID,VisitDate, Item, Price

I wanted to get the latest VisitDate for partiuclar customer and I wanted
pass this value plus 1 day as defualt value while they are adding new records
in Visit table.

I am new to Access Programming, I don't know how to do this in access advise
the best way to do this.

Thanks & Regards
MRP
 
This query gets your number --
SELECT [VisitDetail].CUSTOMERID, Max([VisitDetail].VisitDate)+1 AS NextDate
FROM [VisitDetail]
GROUP BY [VisitDetail].CUSTOMERID;

A macro with SetValue will pass NextDate.
 
Back
Top