Microsoft Access, naming a file with text from a form field

  • Thread starter Thread starter Angela
  • Start date Start date
A

Angela

Is there a way to automate the exporting of a table to an excel spreadsheet
and naming it with text from a form's field?

Thanks for any help.

ARV
 
Try:
DoCmd.TransferSpreadsheet acExport,,"MyTable",
Me.[NameOfYourTextboxHere], True

That assumes the text box contains something like:
C:\MyFolder\MyFile.xls
 
Thanks Allen. You made my day. It works like a charm.

Angela

Allen Browne said:
Try:
DoCmd.TransferSpreadsheet acExport,,"MyTable",
Me.[NameOfYourTextboxHere], True

That assumes the text box contains something like:
C:\MyFolder\MyFile.xls

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

Angela said:
Is there a way to automate the exporting of a table to an excel
spreadsheet and naming it with text from a form's field?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top