G
Guest
I am trying to use the transferspreadsheet docmd in VBA using a sql select
statement against a SQL Server database as follows:
strsql = "select * from tbldoctoroffice where officecode = 2"
DoCmd.TransferSpreadsheet acExport, 8, strsql, "c:\doctoroffice.xls",
True, ""
It does not like the SQL. Is there a way to use a sql statement with the
transferspreadsheet command?
statement against a SQL Server database as follows:
strsql = "select * from tbldoctoroffice where officecode = 2"
DoCmd.TransferSpreadsheet acExport, 8, strsql, "c:\doctoroffice.xls",
True, ""
It does not like the SQL. Is there a way to use a sql statement with the
transferspreadsheet command?