>>>>>>>>>>>>>>
>I'm trying to create an ADO Recordset and when I want to assign it source property I put an SQL Statement like this:
>
>"Select * from mytable where mytable.code = " & strcode & " and mytable.year & mytable.month >= intYear & intMonth"
>>>>>>>>>>>>>>
>
>Does it work if you say:
>
>
>"Select * from mytable where mytable.code = " & strcode & _
>"and mytable.year >= intYear and mytable.month >= intMonth"
>
If strcode is really a string it wouldn't (against most databases anyway). Also, if intYear and intMonth are really variables of the calling program and not field names this would either cause an error or return an empty recordset.
But I guess from all the responses there should be something that works.