Results 1 to 5 of 5
  1. #1
    Join Date
    Jan 2005
    Location
    Western MA
    Posts
    6

    Unanswered: Between Date Help

    First off I would like to say HI as I just joined this forum. I do a lot of reporting at work using MS SQL and MS Access. I just ran into a problem today with some of my MS Access queries and I was hoping you guys might be able to help me.

    I have a MS Access DB that is a front end for data that lives on a MS SQL server. I have users doing reporting for Helpdesk tickets. When they run the queries they get presented with a date box to fill in the start date and the end date using this format: Between [Type begin date MM/DD/YYYY] And [Type end date MM/DD/YYYY]

    This worked great all year until today. Now they want to bring back information from last year and this year. When they run the query it returns all records for last year. The part that is confusing me is if I take the between statement and hard code the dates its works fine. Example: Between 10/01/2004 And 01/03/2005. But the minute I put it back to the between pop up box it returns everything. I have checked the regional settings in windows also and they are fine.

    Any help is greatly appreciated. Thank you!

  2. #2
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    Debug the query before it gets sent to the server. Also, are you using an adp or linked tables?
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  3. #3
    Join Date
    Sep 2004
    Location
    Charlotte, NC
    Posts
    164
    Billan,

    Try this:

    Between CVDate([Type begin date MM/DD/YYYY]) And CVDate([Type end date MM/DD/YYYY])

    TD

  4. #4
    Join Date
    Jan 2005
    Location
    Western MA
    Posts
    6
    Quote Originally Posted by buckeye_td
    Billan,

    Try this:

    Between CVDate([Type begin date MM/DD/YYYY]) And CVDate([Type end date MM/DD/YYYY])

    TD
    Thank you!!! This worked, is there any reason why I would not want to use this format in all my queries?

  5. #5
    Join Date
    Dec 2003
    Location
    Dallas, TX
    Posts
    1,004

    Talking

    Hi Billan and "Welcome to the Forum"

    Just for a different way of doing things take a look at the sample I posted below. Something you might wish to use someday, and if not, hey, just toss it. Anyway hope you enjoy the forum.

    have a nice one,
    BUD
    Attached Files Attached Files

Posting Permissions

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