Dates

tdcsi

Board Regular
Joined
Sep 20, 2011
Messages
86
I apologize up front as I know enough about Access to be dangerous. I have a database created with 2003 that I'm running on 2016 and Windows 7; keep getting the "in use" message when I try to save to 2016, but that beside the point.

In a table, I have a date field using the numeric format (mm/dd/yy). There is a union query to isolate some data that feeds into a normal query (didn't set up, just work with it). In the normal query, I setup a criteria in the column pulling from the union query that only grabs information from the month and year I need to look at; "Like[Enter Month*and Year]". This works great for all months but "1" (January) as the query also produces values for all months that start with a "1": 10,11 & 12. Is there a work around for this?
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
how would it react if you enter 01
 
Upvote 0
What do you actually enter for this criteria:
"Like[Enter Month*and Year]"

I'm not sure why you would be entering month and year then comparing to a date. if I enter a month and a date such as 01 2017 then it seems that may or may not match much of anything if the query has dates in it, so how is this supposed to work? (i.e., because 01 2017 doesn't match 01/01/2017 or 12/01/2017 or anything in between...)

Two good questions you should answer:
1) what is the data type of the dates in the query?
2) what is the data type of the parameter you are using for your user-entered criterion?
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,908
Messages
6,175,306
Members
452,633
Latest member
DougMo

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