Results 1 to 5 of 5

Thread: quote error in query

Threaded View

  1. #2
    Evil Genius alex_read's Avatar
    Join Date
    May 2000
    Location
    Espoo, Finland
    Posts
    5,538
    wow 500 points

    Code:
    strQuery = strQuery & "SELECT * HAVING price BETWEEN '"  & _
    "fromPrice & "' AND '" & toPrice & "'"
    You haven't got a from clause in there !
    In a Select statement, you need to specify which table you need to get this from :
    Code:
    strQuery = strQuery & "SELECT * FROM Table1 HAVING price BETWEEN '" & _ 
    fromPrice & "' AND '" & toPrice & "'"
    Also, you might want to check in debug mode the values of fromPrice & toPrice to make sure they're entered right - maybe using cint(toPrice) to convert this to a number before passing it in ?
    Last edited by alex_read; Jun 28th, 2001 at 03:34 AM.

    Please rate this post if it was useful for you!
    Please try to search before creating a new post,
    Please format code using [ code ][ /code ], and
    Post sample code, error details & problem details

Posting Permissions

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



Click Here to Expand Forum to Full Width