It's been a little while since I've worked a lot with Access, so I'm a little rusty.
What I'm trying to do is create a button that when clicked, will export a query to an Excel Spreadsheet.
When the button is clicked, this is what it's trying to do
When I click, I'm getting a box that says "Compile Error: Invalid Outside Procedure" with "acOutputQuery" highlighted.Code:Private Sub Command0_Click()DoCmd.OutputTo acOutputQuery, "mailinglist", _ acFormatXLS, "mailinglist.xls", True End Sub