I have a form that I use to enter date criteria for transferring data to Excel.
I can hard code the file name in Excel but would prefer to use a variable. The variable depends on the month of year and shows correctly on the form. However, when I run the transfer command below:
DoCmd.TransferSpreadsheet acExport, 8, txtPath, True, “”
I get an error telling me that I have the wrong data type for one of the arguments.
I declared the variable as a variant.
Help! Please!
Thanks,
itconc