Hi Remou,
Below is how I have set the code, would it be correct to run it all or just run the query first?
Sub exportspreadsheet()
On Error GoTo HandleError
Dim db As DAO.Database
Dim rs As DAO.Recordset
Dim strSQL As String
Dim strSQL2 As String
Dim strFileName As String
Dim objXLApp As...
Thank you! I have set the code as follows but now I amm getting an error saying 'Error 3129 - Invalid SQL Statement; expected 'INSERT', 'DELETE', 'UPDATE', 'PROCEDURE' or 'SELECT'
strSQL2 = "SELECT * FROM Final_all " _
& "WHERE Final_all.Store_ID =" & rs!Store_ID _
& " ORDER BY Final_all.ID...
so would I insert that command after I have declared strSQL2? and then refer to Sheet3 as the exporting table?
Sub exportspreadsheet()
On Error GoTo HandleError
Dim db As DAO.Database
Dim rs As DAO.Recordset
Dim strSQL As String
Dim strSQL2 As String
Dim strFileName As String
Dim objXLApp...
Hi, I am trying to create a module that exports data for every store ID in an Access database to individual store excel files. I have come close, so I think, to solving the problem; however, the export string table is not being allowed to export to excel. May someone help me solve my mistake...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.