I try to use TransferSpreadsheet with dynamic query but it doesn't want to accept syntax like:
DoCmd.TransferSpreadsheet acExport, , "SELECT * From outtab" & GetLogin & OrdStr, myPath
I get Run-time Error '7871' : The table name you entered doesn't follow the object-naming rules
it accepts with table but not with sql statment.
I really need TransferSpreadsheet and not OutputTo (TransferSpreadsheet can export more records)