Dynamic Filename in TransferSpreadsheet

Seajay

New member
Local time
Today, 11:50
Joined
May 30, 2001
Messages
9
Hey Everyone,
I'm using the transfer spreadsheet action (export) in a macro and am trying to find a way to specify a filename based on a field in a form. Haven't had much success with it yet and would greatly appreciate any help.

Thanks -
Seajay.
 
Don't think you can do it 'dynamically' in a macro but you should be able to use VBA code to accomplish what you want...

DoCmd.SetWarnings False

DoCmd.TransferSpreadsheet acExport, acFormatXLS, "name of table (or possibly query)", "c:\db_Excel\NANGenderCalls.xls", False, ""

DoCmd.SetWarnings True

HTH JT
 

Users who are viewing this thread

Back
Top Bottom