Hi,
I think best way is to create a form to enter this parameter, so you get it,
append to filename and then pass it to your query
--
Best regards,
___________
Alex Dybenko (MVP)
http://accessblog.net
http://www.PointLtd.com
"LauraB" <(E-Mail Removed)> wrote in message
news:C12B360B-0728-4207-8032-(E-Mail Removed)...
> I have some code that runs a parameter query and then saves the results as
> an
> xls file (see below). What also I'd like to do is capture the entered
> parameter and append it to the filename. Can I programatically access the
> user entered parameter?
>
> DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel97, "Names with
> DateCreated", "C:\Documents\Database\testfile.xls", True
>
>