Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2002
    Posts
    55

    Unanswered: Query quandry...

    I am trying to create a SQL query that will look up a date range. I get a runtime error #13 - Type mismatch when I try... Any help on what I might be missing would be appreciated.

    TIA

    Where represents the SQL lookup.

    Where = Where & " AND [PC_REQ_REQUEST_DT]BETWEEN '" + _ Me![fld_Reqst_Start_DT] + "AND" + Me![fld_Reqst_End_DT] + "'"

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    you're missing some spaces (e.g. around the AND) but most of all, you need to use the octothorp (hash or pound sign) to delimit access dates

    " ... BETWEEN #" + Me![fld_Reqst_Start_DT]
    + "# AND #" + Me![fld_Reqst_End_DT] + "#"

    rudy
    http://r937.com/

Posting Permissions

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