Changing a Name for an Export

C

C. Hernandez

I need to have a data extract renamed by a user. Is there a way to have a
exported file from Access be named from text typed into a combo box?
 
P

Pat Hartman

Sure. Capture the name from the text box in your TransferSpreadsheet
method. This is not possible with a macro by the way. You'll need to
switch to VBA.

DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9,
"SourceTableOrQueryName", Me.txtFileName, True

Me.txtFileName refers to the form field.
 
P

Pat Hartman

Hi Larry. Nice to hear from you. I really miss the MVP group. We moved
back into our house December 20th. I still haven't replaced my computers
because I don't have any place to put them. But I'm baaaaaaaaaaaack :)
 
Top