+ Reply to Thread
Results 1 to 10 of 10

Access DB Novice - Trying to create a query that wiil pick data between 2 dates

  1. #1
    Forum Contributor
    Join Date
    08-30-2011
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    142

    Access DB Novice - Trying to create a query that wiil pick data between 2 dates

    Sorry I am a complete novice to access but I am trying to build a query that will find data between 2 dates. The table headers are EXPR1, EXPR2 through to EXPR 7 the date I want my query to look at is in EXPR 7. Any help would be appreciated

    Many Thanks

  2. #2
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Access DB Novice - Trying to create a query that wiil pick data between 2 dates

    in the criteria field in the query grid you can use between:

    Between #01/01/2012# And #03/01/2012#

    for instance
    Josie

    if at first you don't succeed try doing it the way your wife told you to

  3. #3
    Forum Contributor
    Join Date
    08-30-2011
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    142

    Re: Access DB Novice - Trying to create a query that wiil pick data between 2 dates

    Thanks, the query is working however nothing has returned ? could this be because of the format of date and time in this column 14/04/2009 00:32:00 ?

  4. #4
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Access DB Novice - Trying to create a query that wiil pick data between 2 dates

    as long as they are actual dates and not text (and your date criteria are correct!) it oughta work fine. what's the actual criteria you've used?

  5. #5
    Forum Contributor
    Join Date
    08-30-2011
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    142

    Re: Access DB Novice - Trying to create a query that wiil pick data between 2 dates

    I have just copien your expression #01/01/2012# And #03/01/2012#

    thanks

  6. #6
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: Access DB Novice - Trying to create a query that wiil pick data between 2 dates

    Do you have dates between 1st and 3rd Jan 2012 in the table? (as you are in England, the dates should be treated as dd/mm/yyyy so that's not Jan-March 2012)
    Remember what the dormouse said
    Feed your head

  7. #7
    Forum Contributor
    Join Date
    08-30-2011
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    142

    Re: Access DB Novice - Trying to create a query that wiil pick data between 2 dates

    I have tried again using these dates 1st to 3rd Jan ( these dates are in this field) and also 16/07/2012 to 18/07/2012 (these dates are also in the field. On both ocassions nothing is returned ?

  8. #8
    Forum Contributor
    Join Date
    08-30-2011
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    142

    Re: Access DB Novice - Trying to create a query that wiil pick data between 2 dates

    I have just realised the error in my ways I thought I had originally typed in the "Between" part of the criteria, which was now missing once typed back in this now, works

    Thanks.

    My next question is, how can aI desogn a form to replicate that query whcih enables me to input whatever dates I want ie between 15/07/2012 and 21/07/2012 or 13/07/2012 and 14/07/2012 ?

    Thanks again

  9. #9
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Access DB Novice - Trying to create a query that wiil pick data between 2 dates

    add two textboxes to a form and change the query criteria to
    Between [forms]![form1]![Text0] And [forms]![Form1]![Text2]

    changing the form and textbox names to match your actual database.

  10. #10
    Registered User
    Join Date
    07-19-2012
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    25

    Re: Access DB Novice - Trying to create a query that wiil pick data between 2 dates

    It is really a great information. Thanks for sharing such a informative query..

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1