MS Access: export a query to Excel with Docmd.Output
https://codedocu.com/Details?d=2136&a=8&f=319&l=0 Download: Datei 1: Access_Export_Query.accdb Datei 2: Output_Results.xlsx The example shows how to export an Access query to Excel. The query contains current data from a table, which was filtered by a radio button. For this you use the command Docmd.OutputTo in Microsoft Access As DoCmd.OutputTo acOutputQuery, "qryCars_Sale" , acFormatXLSX, , True When executing the OutputTo command, a Save dialog box is automatically displayed which would like to save a document in Excel. DoCmd.OutputTo acOutputQuery, "qryCars_Sale" , acFormatXLSX, , True The acOutputQuery parameter indicates that a query is in the third parameter. The query query is bound to the form that is currently open and uses a radio button. If you want to output the output directly into a named Excel file, then you have to name the Excel file name with the foll path Dim ...
Comments
Post a Comment