Results 1 to 4 of 4
  1. #1
    Join Date
    Apr 2004
    Location
    Kingsland, Georgia
    Posts
    231

    Unanswered: Use form values as dates in query design mode?

    In the query designer, is there anything i can put to achieve the following:
    "BETWEEN #[Forms]![frmEffCheck]![txtStart]# AND #[Forms]![frmEffCheck]![txtStart]#"
    It won't take the [] bit as a date (denoted by the #s), so is there any way to seperate the dynamic txtStart and txtEnd values from the comparison? I am currently doing this through code with a querydef, but i'd rather not to prevent my .mdb from bloating up. thanks for the help, as always.

  2. #2
    Join Date
    Sep 2004
    Location
    Tampa, FL
    Posts
    520
    If I understand what you are asking then once your field and table are selected then in the Criteria row put:
    Code:
    Between [Forms]![frmEffCheck]![txtStart] AND [Forms]![frmEffCheck]![txtStart]
    If that is not what you are looking for let me know.

    My 2 cents worth.
    Darasen

  3. #3
    Join Date
    Apr 2004
    Location
    Kingsland, Georgia
    Posts
    231
    aw, yeah. i had forgotten to write back. that's exactly what i did. guess i didn't need to specify it as a date. thanks for the help.

  4. #4
    Join Date
    Sep 2004
    Location
    Charlotte, NC
    Posts
    164
    Try this:

    BETWEEN CvDate([Forms]![frmEffCheck]![txtStart]) AND CvDate([Forms]![frmEffCheck]![txtEnd])

    This should work as long as the txtStart and txtEnd dates get entered looking like a date.

    TD

Posting Permissions

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