R
Rhonda Fischer
Hello,
I am attempting to send the output of my query to an
excell spreadsheet. Below I have detailed the line
I code I use to send the Query object and the contents
of my query.
If there a problem when a query gathers conditional
values from a launching form?
Thank you for your response.
Cheerio
Rhonda
CODE:
====
DoCmd.SendObject acSendQuery, QryReportStatsRDC,
acFormatXLS, , , , "Delivery Profile To RDC From TURNERS
(SOHAM) LTD."
QUERY: QryReportStatsRDC
========================
SELECT [Deliveries Made].[Del Date], [Deliveries
Made].RDC, [Deliveries Made].[Arr Time], [Delivery
Points].Customer, [Deliveries Made].[Book Time],
[Deliveries Made].[Coll Point], [Deliveries Made].[Coll
Point2], [Deliveries Made].[Coll Point3], [Deliveries
Made].[Coll Point4]
FROM [Deliveries Made] INNER JOIN [Delivery Points] ON
[Deliveries Made].RDC = [Delivery Points].RDC
WHERE ((([Deliveries Made].[Del Date])>=[Forms]!
[FrmReportsRDCMenu]![txtStartDate] And ([Deliveries Made].
[Del Date])<=[Forms]![FrmReportsRDCMenu]![txtEndDate]) AND
(([Deliveries Made].RDC)=[Forms]![FrmReportsRDCMenu]!
[Select RDC])) OR ((([Deliveries Made].[Del Date])>=
[Forms]![FrmReportsRDCMenu]![txtStartDate] And
([Deliveries Made].[Del Date])<=[Forms]!
[FrmReportsRDCMenu]![txtEndDate]) AND (([Delivery
Points].Customer)=[Forms]![FrmReportsRDCMenu]![Select
Network]))
GROUP BY [Deliveries Made].[Del Date], [Deliveries
Made].RDC, [Deliveries Made].[Arr Time], [Delivery
Points].Customer, [Deliveries Made].[Book Time],
[Deliveries Made].[Coll Point], [Deliveries Made].[Coll
Point2], [Deliveries Made].[Coll Point3], [Deliveries
Made].[Coll Point4]
ORDER BY [Deliveries Made].[Del Date], [Deliveries
Made].RDC, [Deliveries Made].[Arr Time];
I am attempting to send the output of my query to an
excell spreadsheet. Below I have detailed the line
I code I use to send the Query object and the contents
of my query.
If there a problem when a query gathers conditional
values from a launching form?
Thank you for your response.
Cheerio
Rhonda
CODE:
====
DoCmd.SendObject acSendQuery, QryReportStatsRDC,
acFormatXLS, , , , "Delivery Profile To RDC From TURNERS
(SOHAM) LTD."
QUERY: QryReportStatsRDC
========================
SELECT [Deliveries Made].[Del Date], [Deliveries
Made].RDC, [Deliveries Made].[Arr Time], [Delivery
Points].Customer, [Deliveries Made].[Book Time],
[Deliveries Made].[Coll Point], [Deliveries Made].[Coll
Point2], [Deliveries Made].[Coll Point3], [Deliveries
Made].[Coll Point4]
FROM [Deliveries Made] INNER JOIN [Delivery Points] ON
[Deliveries Made].RDC = [Delivery Points].RDC
WHERE ((([Deliveries Made].[Del Date])>=[Forms]!
[FrmReportsRDCMenu]![txtStartDate] And ([Deliveries Made].
[Del Date])<=[Forms]![FrmReportsRDCMenu]![txtEndDate]) AND
(([Deliveries Made].RDC)=[Forms]![FrmReportsRDCMenu]!
[Select RDC])) OR ((([Deliveries Made].[Del Date])>=
[Forms]![FrmReportsRDCMenu]![txtStartDate] And
([Deliveries Made].[Del Date])<=[Forms]!
[FrmReportsRDCMenu]![txtEndDate]) AND (([Delivery
Points].Customer)=[Forms]![FrmReportsRDCMenu]![Select
Network]))
GROUP BY [Deliveries Made].[Del Date], [Deliveries
Made].RDC, [Deliveries Made].[Arr Time], [Delivery
Points].Customer, [Deliveries Made].[Book Time],
[Deliveries Made].[Coll Point], [Deliveries Made].[Coll
Point2], [Deliveries Made].[Coll Point3], [Deliveries
Made].[Coll Point4]
ORDER BY [Deliveries Made].[Del Date], [Deliveries
Made].RDC, [Deliveries Made].[Arr Time];