Hi all, am having a runtime error while exportnig data by running a query through TransferSpreads heet command
Error it shows:
object could not be found 'Select * from [Volumes_Data] where [Volumes_Data].[Month] =200704
The relevant code is:
Dim strQuery As String
strMonth = cmbMonth.Value
strQuery = ("Select * from [Volumes_Data] where [Volumes_Data].[Month] =" & strMonth)
DoCmd.TransferS preadsheet acExport, acSpreadsheetTy peExcel8, strQuery, strOutputFile & "Silo_Repor t"
Error it shows:
object could not be found 'Select * from [Volumes_Data] where [Volumes_Data].[Month] =200704
The relevant code is:
Dim strQuery As String
strMonth = cmbMonth.Value
strQuery = ("Select * from [Volumes_Data] where [Volumes_Data].[Month] =" & strMonth)
DoCmd.TransferS preadsheet acExport, acSpreadsheetTy peExcel8, strQuery, strOutputFile & "Silo_Repor t"
Comment