JoeSand2005
asked on
MS Access Ship Date
Hi Guys,
thanks in advance. I have a query in which I'm trying to get the latest ship date but going back 11 month. Is there any function that would allow me to get this info.
so far I've applied the mix function but I need to go back 11 month.
Thanks!
Joe
thanks in advance. I have a query in which I'm trying to get the latest ship date but going back 11 month. Is there any function that would allow me to get this info.
so far I've applied the mix function but I need to go back 11 month.
Thanks!
Joe
ASKER
Hey Rockiroads,
Thanks for your help. I still don't get what I'm looking for.
Note: I apply your function but doesn't work. Do you guys know why?
Here is the query I created:
SELECT Max([Orders].[Ship Date]) AS [Last Ship Date], Contacts.FirstName, Contacts.LastName, Contacts.Emails
FROM Contacts LEFT JOIN [GC-Orders] ON Contacts.ContactID = [Orders].CompanyID
GROUP BY Contacts.FirstName, Contacts.LastName, Contacts.Emails, Contacts.CompanyName
HAVING (((Max([Orders].[Ship Date]))>= dateadd("m", -11, [Ship Date]))
ORDER BY Max([Orders].[Ship Date]) DESC;
Thanks for your help. I still don't get what I'm looking for.
Note: I apply your function but doesn't work. Do you guys know why?
Here is the query I created:
SELECT Max([Orders].[Ship Date]) AS [Last Ship Date], Contacts.FirstName, Contacts.LastName, Contacts.Emails
FROM Contacts LEFT JOIN [GC-Orders] ON Contacts.ContactID = [Orders].CompanyID
GROUP BY Contacts.FirstName, Contacts.LastName, Contacts.Emails, Contacts.CompanyName
HAVING (((Max([Orders].[Ship Date]))>= dateadd("m", -11, [Ship Date]))
ORDER BY Max([Orders].[Ship Date]) DESC;
ASKER
Just One Clarification companyname is not part of the query
thanks!
SELECT Max([Orders].[Ship Date]) AS [Last Ship Date], Contacts.FirstName, Contacts.LastName, Contacts.Emails
FROM Contacts LEFT JOIN [Orders] ON Contacts.ContactID = [Orders].CompanyID
GROUP BY Contacts.FirstName, Contacts.LastName, Contacts.Emails
HAVING (((Max([Orders].[Ship Date]))>= dateadd("m", -11, [Ship Date]))
ORDER BY Max([Orders].[Ship Date]) DESC;
thanks!
SELECT Max([Orders].[Ship Date]) AS [Last Ship Date], Contacts.FirstName, Contacts.LastName, Contacts.Emails
FROM Contacts LEFT JOIN [Orders] ON Contacts.ContactID = [Orders].CompanyID
GROUP BY Contacts.FirstName, Contacts.LastName, Contacts.Emails
HAVING (((Max([Orders].[Ship Date]))>= dateadd("m", -11, [Ship Date]))
ORDER BY Max([Orders].[Ship Date]) DESC;
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks Rockiroads it works, eventhough I was having some problems becouse of the fact that I wanted the most recent ship date.
Thanks!
Thanks!
from somedate, it returns the date 11 months ago