In an access Query how do you get data for the current month

D

Dram

I would like to extract data for the current month only from my data base
based on a receipt date. formated as mm/dd/yyyy I can get todays stuff and
last months stuff but simply can't get the current month.
 
K

KARL DEWEY

Open your query in design view, scroll to the right to find a blank column
and enter this in the Field row of the grid -- Last_Month: Format([receipt
date], "yyyymm")
Below in the Criteria row enter -- Format(DateAdd("m",-1,Date()),"yyyymm")
 
D

Dram

As written this returned the previous months data, but it gave me a starting
point. by changing the -1 to a 0 it returned the curent months data. So thank
you very much it was exactly what I needed and is very much appreciated.

KARL DEWEY said:
Open your query in design view, scroll to the right to find a blank column
and enter this in the Field row of the grid -- Last_Month: Format([receipt
date], "yyyymm")
Below in the Criteria row enter -- Format(DateAdd("m",-1,Date()),"yyyymm")

--
KARL DEWEY
Build a little - Test a little


Dram said:
I would like to extract data for the current month only from my data base
based on a receipt date. formated as mm/dd/yyyy I can get todays stuff and
last months stuff but simply can't get the current month.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top