M MissAnna Registered User. Local time Today, 18:37 Joined May 14, 2002 Messages 10 Apr 28, 2003 #1 Hi all, I need help retrieving records... the records I need the query to retrieve are from the current month one year ago, or this month last year Can anybody help me with this? Thanks! Anna
Hi all, I need help retrieving records... the records I need the query to retrieve are from the current month one year ago, or this month last year Can anybody help me with this? Thanks! Anna
M Mitch_____W Mitch Local time Today, 13:37 Joined Oct 31, 2001 Messages 73 Apr 28, 2003 #2 Try the following in the your date field's "Criteria": Between Date()-365 and Date() That should do the trick...
Try the following in the your date field's "Criteria": Between Date()-365 and Date() That should do the trick...
M MissAnna Registered User. Local time Today, 18:37 Joined May 14, 2002 Messages 10 Apr 28, 2003 #3 Hi Mitch, Thanks for that, it works for returning last years records which is great. Unfortunately the query is returning all months last year, as opposed to this month last year..do you know how I would fix that? Thanks for your help, Anna
Hi Mitch, Thanks for that, it works for returning last years records which is great. Unfortunately the query is returning all months last year, as opposed to this month last year..do you know how I would fix that? Thanks for your help, Anna
J Jon K Registered User. Local time Today, 18:37 Joined May 22, 2002 Messages 2,209 Apr 28, 2003 #4 Try this setting in a column in the query grid (replacing with the correct name of the date field):- Field: Format([nameOfDateField],"yyyym") Show: uncheck Criteria: Format(DateAdd("yyyy",-1,Date()),"yyyym")
Try this setting in a column in the query grid (replacing with the correct name of the date field):- Field: Format([nameOfDateField],"yyyym") Show: uncheck Criteria: Format(DateAdd("yyyy",-1,Date()),"yyyym")
M MissAnna Registered User. Local time Today, 18:37 Joined May 14, 2002 Messages 10 Apr 28, 2003 #5 Thanks Jon! That appears to be working, thank you. The query is retrieving duplicates though, i.e. returning the same record 4 times, is there a way I can stop that? Thanks very much for your assistance! Anna
Thanks Jon! That appears to be working, thank you. The query is retrieving duplicates though, i.e. returning the same record 4 times, is there a way I can stop that? Thanks very much for your assistance! Anna
M MissAnna Registered User. Local time Today, 18:37 Joined May 14, 2002 Messages 10 Apr 28, 2003 #6 Hi, Strike my last comment, they're not duplicate records after all.....thank you again for your help! It works perfectly... Anna
Hi, Strike my last comment, they're not duplicate records after all.....thank you again for your help! It works perfectly... Anna