Access Query current quarter

Godders199

Active Member
Joined
Mar 2, 2017
Messages
305
Office Version
  1. 2013
Hello, i am trying to run an access query with the following date criteria, but when i run it just returns all the rows that match the other criteria specified, not just for the current quarter

Year([todays date])=Year(Now()) And DatePart("q",Date())=DatePart("q",Now())

from the view , if i click on the filter for the column todays date , i get the following error message " Syntax error (missing operator in query expression "todays date"

I just cant see any thing wrong.

Any help would be appreciated.
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.

Micron

Well-known Member
Joined
Jun 3, 2015
Messages
2,233
Office Version
  1. 365
Platform
  1. Windows
what is [todays date] and where is this written - in code or a query? If it's code, you need date delimiters.
You should provide the rest of the sql or related code since by itself, it doesn't make much sense to me. Either side of the AND will be either True or False, which is incomplete when taken by itself.
 
Last edited:

Godders199

Active Member
Joined
Mar 2, 2017
Messages
305
Office Version
  1. 2013
Hi, [todays date] is just the column heading, and is just written within a Query I had created in the criteria field, as a temp fix i have changed the criteria to >#01/04/2018# which works, just means at the start of each quarter i will need to amend.
 

Forum statistics

Threads
1,140,996
Messages
5,703,623
Members
421,306
Latest member
ambuj Thakur

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top