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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Show records not older than 3 months

Status
Not open for further replies.

laserwoman

Technical User
Jul 25, 2001
2
NL
Hallo,

Can anyone tell me how to show records from an access db that are not older than 3 months on my website? I’m working with front page 2000.

Thx

If you can't use your hands, be smart, use your head!
 
You will need to add a field to your database to show the date it was created. Then add to your query string something like AND DBDATE > (TODAY - 90).
The actual language will vary depending on the version of Access you're using.
You can get the actual language from MS Access, by opening the sample NORTHWIND database. Open Queries, then open "Product sales for 1994" and then VIEW SQL.
on my version, it looks like this.
---------
SELECT DISTINCTROW Categories.CategoryName, Products.ProductName, Sum(CCur([Order Details].[UnitPrice]*[Quantity]*(1-[Discount])/100)*100) AS ProductSales
FROM (Categories INNER JOIN Products ON Categories.CategoryID = Products.CategoryID) INNER JOIN (Orders INNER JOIN [Order Details] ON Orders.OrderID = [Order Details].OrderID) ON Products.ProductID = [Order Details].ProductID
WHERE (((Orders.ShippedDate) Between #1/1/94# And #12/31/94#))
GROUP BY Categories.CategoryName, Products.ProductName;
-------------
Now look at the WHERE ((( orders. shoppeddate) line, and change it to fit the "today - 90" and you should have it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top