Dear sir,
I want to create a query at runtime and assigning value to them through a sql query.what is the error here. error is shown over variable qdf declaration
I want to create a query at runtime and assigning value to them through a sql query.what is the error here. error is shown over variable qdf declaration
Code:
[B] Dim QDF As QUERYDEF[/B] 'On Error Resume Next DoCmd.DeleteObject acQuery, "databaseQuery" 'On Error GoTo 0 Set QDF = CurrentDb.CreateQueryDef("databaseQuery", ssqltext) ' 'Export it to Excel DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, "databaseQuery", "C:\MyExcelData.xls" 'Export it to Text 'DoCmd.TransferText acExportDelim, , "databaseQuery", "C:\MyData.txt"
Comment