This error is now occurring with a second query. Each query is returning
about 10 records.
output method
DoCmd.TransferSpreadsheet acExport, _
acSpreadsheetTypeExcel9, "Report_Outstanding_BILL", _
"C:\Outstanding Queries Spreadsheet.xls", , "BILLING"
SQL
SELECT tble_Query.QueryID AS Query, tble_Query.Qry_ChaseDate AS Chase,
DateDiff("d",[Qry_Chasedate],Date()) AS Diff, tble_Query.Cont_InvName AS
Investigator, tble_Query.Fin_CInvNo, tble_Query.Fin_InvNo,
tble_Query.CustomerName AS Customer
FROM tble_Query
WHERE (((tble_Query.Qry_Current)="Finance") AND
((tble_Query.Qry_Status)="outstanding"))
ORDER BY DateDiff("d",[Qry_Chasedate],Date()) DESC;
John Spencer said:
Ok, then what is the SQL of the query?
What is the code (or method) that you are using to export the query
results?
How many records are returned by the query?
--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..
Opening the query is fine.
:
What is the SQL of the query that is failing?
Does that query run if you just call it?
I have a set of queries which each has 6 or 7 fields. They are being
exported
to the same spreadsheet but one query is throwing up this error.