current date in access?

  • Thread starter Thread starter WebAtl
  • Start date Start date
W

WebAtl

Guest
Can anyone tell me how to build a "where" clause that will only pull back records for the current month?

I would appreciate it if anyone could help me out.
 
Create a new column in the query grid:

TheMonth: Format([YourDateField],"mmyy")

In the same column's Criteria row, put:

Format(Date(),"mmyy")
 
I didn't really understand that.

I don't have a "date" column...I have a month column and I need to read the server's current month and pull back data for that month only.

is there a way to do that?
 
Well, use the

Format(Date(),"mmyy")

Statement and change the "mmyy" part to match what you have in your month field. So, if you are storing Jan, Feb, Mar ... then you would use:

Format(Date(),"mmm")

If it is January, February, March ... then

Format(Date(),"mmmm")

These statements would be in the Criteria row in your query.

FYI - Date() returns the system date.
 
Okay. I'll try that. Thanks for your help! I really appreciate it.
 

Users who are viewing this thread

Back
Top Bottom