Export Access 2007 Query to Excel 2007+

Hi,

I am trying to export the results of a query to excel so that i can use the excel sheet on my tablet pc.

However, when the excel sheet is saved to my pc it is in "2003-2007" format and this is not compatible with my tabet pc.

I need to change my code (below) so that the excel file is in a later format than 2003-2007.

Can anyone help please?

DoCmd.OutputTo acOutputQuery, "MSSL Customer Details", "Excel97-Excel2003Workbook(*.xls)", "", True, "", 0, acExportQualityPrint

I have also tried the following code but this is no good either:

DoCmd.OutputTo acQuery, "MSSL Customer Details", "MicrosoftExcel(*.xlsx)", "", False, ""

Many thanks
andrewpiconnectAsked:
Who is Participating?
 
Rey Obrero (Capricorn1)Connect With a Mentor Commented:
try using



DoCmd.OutputTo acOutputQuery, "MSSL Customer Details", "Excel Workbook(*.xlsx)", "", True, "", 0, acExportQualityPrint
0
 
andrewpiconnectAuthor Commented:
works a treat....many thanks
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.