Friday, 15 July 2011

User-defined date range for Access query pulling outside date range -


I have an Access 2007 database, which requires a query every week to run every week that worked in the first week Was there. The current setup is:

  • I have a query where the date range is the WHERE criterion: between [Form]! [Frm_Menu]! [Txt_fromdate] and [form]! [Frm_Menu]! [Txt_todate] + "1"
  • The "fromdate" and "todate" text boxes in frm_Menu are unbound text boxes. I "Sedet" has an "unchanged" event, which is selected in "date" in "todate" Fills in 6 days with date.
  • After filling "fromdate" and "todate" frm_Menu has a button to run the query. In these cases, when I run a query for a week's record, then I am out of the selected date range Entries are available. For example, if my "todate" text box is "3/1/2015" and "todate" in the text box "3/7/2015", then the results will be obtained from 3/1 to 3/7, but I am also getting results from 3/10, 3/11 and 3/12. First of all, I thought this "3/1/2015" can be read as "3 / 1x" / 2015, "but he does not explain why I only 3 / I am getting extra results in addition to 10 to 3/12 and not even 3/13 to 3/19.

    Does anyone know what might be the reason for this? This problem To solve, I'm just running a query that collects everything and then what is needed in Excel before sending it. In terms of course, I would like the person who needs this report to open the database themselves, select the date range, and then export query results from the login.

< P>

It has been found that instead of date / time there was data type for date column in the form of text. Trying the same question again and it worked perfectly. Just a PEBKAC error B.


No comments:

Post a Comment