Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2011
    Posts
    71

    Unanswered: Query Where Clause Issue

    Good Morning

    I am attempting to open a report from a form that will gather and select the paramaters for the report. I have succssfully created paramaters with String variables, however a Date field is giving me a small problem. I am using the DoCmd.OpenReport to execute my report when a button is clicked. I have worked with several iterations of this where clause code, so I will give a couple of examples.


    "[IDate] >= " & [box_StartDate]
    [IDate] >= [box_StartDate]


    Any way I have attempted to alter this code, I always get the same result. For all > equations, if the date encompasses all records [IDate] then everything shows up else Northing. If I use a < equation then if the date = any record [Idate] then they all show up, other wise nothing.

    Both my table's data and control data, are formated to short form dates. I'm sure this is a simple solution and I've just stared at it to long to see it. Thanks for your time.

  2. #2
    Join Date
    May 2005
    Location
    Nevada, USA
    Posts
    2,888
    Provided Answers: 6
    See here for the delimiters required for a date value:

    Open a second form to the record
    Paul

  3. #3
    Join Date
    Oct 2011
    Posts
    71
    Thanks so much! I actually tried that at one time, but I put the # around the field name too, wasn't the brightest thing for me to try. However, the page helped tremendously.

    Thanks!

  4. #4
    Join Date
    May 2005
    Location
    Nevada, USA
    Posts
    2,888
    Provided Answers: 6
    Happy to help!
    Paul

Posting Permissions

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