wow 500 points
You haven't got a from clause in there !Code:strQuery = strQuery & "SELECT * HAVING price BETWEEN '" & _ "fromPrice & "' AND '" & toPrice & "'"
In a Select statement, you need to specify which table you need to get this from :
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 ?Code:strQuery = strQuery & "SELECT * FROM Table1 HAVING price BETWEEN '" & _ fromPrice & "' AND '" & toPrice & "'"





Reply With Quote