SELECT Weekday([DeliveryDate]) AS MyWeekDay, 6-[MyWeekDay] AS AddDays,
Orders.[Order Number], Orders.ContractDate, Shipping.DeliveryDate,
Customer.Last1, Orders.OrderStatus, Shipping.LoadDate, DEALER.LastName1,
Shipping.ShipState, Shipping.ShipCounty, Orders.PreCut, Shipping.ShipCity,
Orders.EstimateTypeID, Orders.WoodType, Orders.CutStyle,
Orders.OrderCategory, Orders.ModelName, Shipping.EstNoTrucks,
Customer.TaxCode, Orders.Terms, Orders.EstimatedSale,
Orders.EstimatedMarginPercent, Orders.EstimatedMarginDollars,
qryAmounts.[Running Total], Orders.LGLF, Orders.SDLF, Orders.SCF, Orders.FLC,
Orders.Trusses, qryAmounts.[Original Contract], qryAmounts.[Total Payments],
qryAmounts.[Percentage In], qryAmounts.[Balance Due], Shipping.PackListDate,
Orders.CustomerServiceRep, Orders.CommissionRate, [Running
Total]*[CommissionRate]*0.01 AS CommissionDue,
IIf([AddDays]<1,DateAdd("ww",2,[DeliveryDate]),DateAdd("ww",1,[DeliveryDate]))
AS WeekDate, DateAdd("d",[AddDays],[WeekDate]) AS DueDate,
Orders.BlueprintStatus, Shipping.OriginofDelivery, Orders.SRProducts,
Orders.Solarium
FROM (Customer INNER JOIN ((DEALER INNER JOIN Orders ON
DEALER.SalesRepNumber = Orders.SalesRepNumber) INNER JOIN qryAmounts ON
Orders.[Order Number] = qryAmounts.[Order Number]) ON Customer.CustomerNumber
= Orders.CustomerNumber) LEFT JOIN Shipping ON Orders.[Order Number] =
Shipping.OrderNumber
WHERE (((Shipping.DeliveryDate) Between [Enter Start Date] And [Enter End
Date]) AND ((Orders.OrderStatus)="c" Or (Orders.OrderStatus)="t" Or
(Orders.OrderStatus)="s" Or (Orders.OrderStatus)="d"))
ORDER BY Shipping.DeliveryDate, DEALER.LastName1;
Jeff Boyce said:
David
If the query returns duplicate, the report based on it will. If you post
the SQL of your query, perhaps we can spot a clue.
Regards
Jeff Boyce
Microsoft Office/Access MVP
Davidjc52 said:
The query returns the duplicates for these 2 customers for this particuar
dealer.
Jeff Boyce said:
David
If your report is based on a query, and if that query is based on a
couple
of tables joined (you did mention [dealers] and [customers]), I'd check
that
query, first, to see what records it's returning.
Regards
Jeff Boyce
Microsoft Office/Access MVP
We have a 2003 access database, we have tables for our dealers and
customers.
Recently all reports about our customers homes have just started
creating
duplicate records when the report is generated, but only for one of our
dealers and only for some of his customers. I have looked through all
of
the
tables for duplicate records and have found nothing. I have no idea
what
is
causing this.
Thanks