View Full Version : Dynamic Filename in TransferSpreadsheet


Seajay
07-22-2003, 09:53 AM
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.

jtvcs
07-24-2003, 07:40 AM
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