The Student Room Group
Reply 1
lizipopz
hey guys, trying to set up my queries but got a little stuck on my criteria wondering if anyone could point me in the right direction?
i need to find records with a date within a set time period, for example an expiry date that's three weeks from the current date, but i dont know how to phrase this or even if it would be possible
help appreciated :smile:


i think you may need to create and advanced query using the query builder function on access, this should allow you to do that query.... word of warning i advise you to get the teacher top help because the codes are soo confusing :eek: and you may mess up your entire system
GOOD LUCK!! :biggrin:
Reply 2
lizipopz
hey guys, trying to set up my queries but got a little stuck on my criteria wondering if anyone could point me in the right direction?
i need to find records with a date within a set time period, for example an expiry date that's three weeks from the current date, but i dont know how to phrase this or even if it would be possible
help appreciated :smile:


In a query add a calculated field at the end of the grid. Something like

DaysUntilExpiry: DateDiff("d",date(),[ExpiryDate])

This'll give you the number of days between today and a field in your table called ExpiryDate. Criteria is then <=21 (or however many days you want for the cut off)

HTH
FatMax
www.fatmax.org

Latest

Trending

Trending