magari qui (Recordset1.Fields.Item("filename").Value) c'è un NULL...