Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Saving an Excel Spreadsheet with a name taken from Access Form 1

Status
Not open for further replies.

CSADataCruncher

Technical User
Feb 5, 2004
74
US
I currently have a macro that runs behind a command button on my MS Access Form that saves an Excel spreadsheet created from a Query. My problem is, my boss wants the command button to automatically save the file incorporating the "Group" selected on the Access Form as part of the spreadsheet name. I tried adding [Forms]![fTERTrack]![Group] to my Output file name which saved my file as "[Forms]![fTERTrack]![Group]". So, I tried adding the & symbol with an additional word as the file name and putting the [Forms]![fTERTrack]![Group] in parenthesis, but it just added the parens and ampersand to my file name.

Is there a way to save the file with different names depending on the Group name chosen on the form?

Thanks for any help offered,
Peggy
 
I didn't check the code after adding "date part". Glad it worked..

________________________________________________________________________
Zameer Abdulla
Visit Me
A person who misses a chance and the monkey who misses its branch can't be saved.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top