Help repairing a Query Expression show records by a specified year

Kemidan2014

Board Regular
Joined
Apr 4, 2022
Messages
229
Office Version
  1. 365
Platform
  1. Windows
I have a Query im using for a macro that exports the results to an excel file we use to graph the data since excel is more powerful until recently everything was working fine and it was discovered today it was explicitly outputting dates as 7/16/1905 for all records BUT! correctly outputing the records that are truly for the year we ask it to output. until today it put the correct issue date in the column when the export runs
a picture of todays results. the 24 stands for the year it was issued. 52-58 are all the ones we issued for this current year (confirmed by looking at actual back end table) but what was in Column B "Expr1" used to say "IssueDate" which is the name of the field for the Table
1709835189596.png


My QUERY for this used to say
FIeld: Expr: Year([IssueDate]}
Table: <blank>
Sort: <blank>
Show: Yes
Criteria: [Forms]![FrontPage]![evalyear] <~ This is a unbound field i have on a form for user to reference what year they need information from i use it for alot of other functions so we dont want to change this.

When i went to one of my older back ups it was BEFORE i added the year filter int he first place so if i go back to that it just gives you all records in the table

I tried doing this:
1709835451463.png

Result was NO records pulled

Here is the Table data for reference
1709835515742.png


Goal, i need Column B in my export to show the Issue dates associated with the records and not just "7/16/1905" or the year "2024"

any help is appreciated
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
You would have to compare the year part of the whole date to the year value. If that expression returns 2023, then no record will have 2023 as a value in that field (2023 <> 02/26/2023). Also, if the control contains 2023, you don't need the Year function. Try DatePart function; maybe like
DatePart("yyyy",[IssueDate]) = Forms!FrontPage!evalyear

EDIT - That assume the date textbox will always be 4 digit year.
more date functions (and others)
 
Upvote 0

Forum statistics

Threads
1,223,885
Messages
6,175,187
Members
452,616
Latest member
intern444

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
Back
Top