Pulling data from the current month

  • Thread starter Thread starter Jason
  • Start date Start date
J

Jason

Is there a way to pull data with a date in the current
month? I need to do this with out prompting for the
paramaters. I have a column labled date in my table and it
has the short date format.


Thank You
 
Add a calculated column in your query
DateMth: Format([Date],"yyyymm")
and set the criteria to
Format(Date(),"yyyymm")

btw: Date is not a good name for a field since it is a function name.
 
Is there a way to pull data with a date in the current
month? I need to do this with out prompting for the
paramaters. I have a column labled date in my table and it
has the short date format.


Thank You

A criterion of
= DateSerial(Year(Date()), Month(Date()), 1) AND < DateSerial(Year(Date()), Month(Date()) + 1, 1)

will do the job. (The format is irrelevant, and as noted elsethread,
you should change the field name!)
 
Is there a way to pull data with a date in the current
month? I need to do this with out prompting for the
paramaters. I have a column labled date in my table and it
has the short date format.


Thank You

Jason,
Regarding: >a column labled date in my table <
Here is some Microsoft KnowledgeBase reading material regarding the
use of reserved words in Access/VBA.

109312 'Reserved Words in Microsoft Access'
209187 'Acc2000: 'Reserved Words in Microsoft Access'
286335 'ACC2002: Reserved Words in Microsoft Access'
 
Back
Top