Correction, I missed an &

The prior is for integer values only. If it is a string variable then


strSQL = "SELECT * FROM Detfact WHERE Folio =" & " " & "'" & fol & "'"


Set RS = DB.OpenRecordset( strSQL, dbOpenDynaset)