>I need to execute an sql statment in a recordset.for example
>rst.open "SELECT * FROM rst WHERE field1 >= variable1 AND field1 <=variable2"
>
>Is this right.
Can't be done. You can use a Filter like so:
rst.Filter = "field1>=" & variable1 & " AND field1<=" & variable2
If var1 and 2 are strings then you need to enclose the values within quotes.