troubleshooting Question

Access SQL Update with Max not working

Avatar of Murray Brown
Murray BrownFlag for United Kingdom of Great Britain and Northern Ireland asked on
Microsoft AccessSQL
3 Comments2 Solutions73 ViewsLast Modified:
Hi

In Access I am getting the error "Your query does not include the specified expression ‘LastRenewalDate’ as part of an aggregate function" for the following

UPDATE t_Licence INNER JOIN t_Renewals ON t_Licence.LicenceNumberPK = t_Renewals.LicenceNumberFK SET t_Licence.LastRenewalDate = Max(t_Renewals.RenewalDate)
WHERE (((t_Renewals.LicenceNumberFK)=[t_Licence].[LicenceNumberPK]));

I previously ran the query without the Max in it and it worked fine

UPDATE t_Licence INNER JOIN t_Renewals ON t_Licence.LicenceNumberPK = t_Renewals.LicenceNumberFK SET t_Licence.LastRenewalDate = t_Renewals.RenewalDate
WHERE (((t_Renewals.LicenceNumberFK)=[t_Licence].[LicenceNumberPK]));
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 2 Answers and 3 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 3 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros