J
Jim
I'm trying to use the TransferSpreadsheet statement below to export query
results to an excel file. Everything works fine if varQuery1 equals a stored
query, "qry_Facilities", but if I set varQuery1 to "Select FacilityID as
Facility Identification from tbl_Facility" I get a 3011 run-time error, could
not find object 'Select....'
DoCmd.TransferSpreadsheet acExport, , varQuery1, varDataOutputFolder &
varExcelFileName, , varTab1
What I have is a multi-language application and I'm trying to dynamically
change the column headings based on the language the User has selected. I
have a function that converts the English text to the User language but I
could not call it from within the query builder. I guess I could rewrite the
stored query with the appropriate column titles… is there a way to create a
stored query from vb?
Thanks in advance,
Jim
results to an excel file. Everything works fine if varQuery1 equals a stored
query, "qry_Facilities", but if I set varQuery1 to "Select FacilityID as
Facility Identification from tbl_Facility" I get a 3011 run-time error, could
not find object 'Select....'
DoCmd.TransferSpreadsheet acExport, , varQuery1, varDataOutputFolder &
varExcelFileName, , varTab1
What I have is a multi-language application and I'm trying to dynamically
change the column headings based on the language the User has selected. I
have a function that converts the English text to the User language but I
could not call it from within the query builder. I guess I could rewrite the
stored query with the appropriate column titles… is there a way to create a
stored query from vb?
Thanks in advance,
Jim