I´m using this statement using an integer variable (fol ) to do the search, but I get this error :

Run-Time error '3061'
too few parameters expected 1.

Set RS = DB.OpenRecordset("SELECT * FROM Detfact WHERE Folio = fol", dbOpenDynaset)


Thanks...