It looks like you set the downloaded file to come from a recordset, but that recordset is looped on and has multiple rows. You would probably need to create a second recordset that is filtered by the submitted form, or use the posted form value for the file name instead of the recordset so it knows which file to download. The way it is now it will always be the first row in the recordset you have it bound to.