ComradeGrumbles
Registered User.
- Local time
- Yesterday, 19:57
- Joined
- Jul 9, 2014
- Messages
- 20
Hi again everyone. I have a query that "sorta" works, but doesn't seem to abide by one of my criteria.
I am trying to search by two criteria in this query. First, I want the query to select records based on what "System" they relate to. Next, I want it to sort those tickets by "Release Date." Ex. System 1 has a bunch of tickets with release dates ranging from July, 2014 to August, 2016. I want to find System 1 tickets with release dates before November, 2015.
Here's the SQL code for the Where portion of my query. The Select and From portions work fine as far as I can tell.
WHERE ((([SPR Priority].[Release Date]) Between Date() And Forms![Navigation Form].Form!NavigationSubform.Form!ReleaseDateEnter) And (([SPR Priority].[System(s)])=Forms![Navigation Form].Form!NavigationSubform.Form!SystemReleaseSearch));
This code correctly searches by the system I select from the dropdown "SystemReleaseSearch" on my form. It doesn't seem to properly abide by the textbox "ReleaseDateEnter" though.
What I think that it's doing is it gives me any ticket with a release date before the month and day that I put in the ReaseDateEnter textbox. It seems to disregard the year though. Ex. I put in 09/21/2014 and want to see dates between today and that date. Access gives me those dates, PLUS dates in 2013 that fall between 07/28/2013 and 09/21/2013. I can't really make any sense of this.
Any ideas?
I am trying to search by two criteria in this query. First, I want the query to select records based on what "System" they relate to. Next, I want it to sort those tickets by "Release Date." Ex. System 1 has a bunch of tickets with release dates ranging from July, 2014 to August, 2016. I want to find System 1 tickets with release dates before November, 2015.
Here's the SQL code for the Where portion of my query. The Select and From portions work fine as far as I can tell.
WHERE ((([SPR Priority].[Release Date]) Between Date() And Forms![Navigation Form].Form!NavigationSubform.Form!ReleaseDateEnter) And (([SPR Priority].[System(s)])=Forms![Navigation Form].Form!NavigationSubform.Form!SystemReleaseSearch));
This code correctly searches by the system I select from the dropdown "SystemReleaseSearch" on my form. It doesn't seem to properly abide by the textbox "ReleaseDateEnter" though.
What I think that it's doing is it gives me any ticket with a release date before the month and day that I put in the ReaseDateEnter textbox. It seems to disregard the year though. Ex. I put in 09/21/2014 and want to see dates between today and that date. Access gives me those dates, PLUS dates in 2013 that fall between 07/28/2013 and 09/21/2013. I can't really make any sense of this.
Any ideas?
Last edited: