Hi TheAceMan1,
Here is my query:
SELECT tblOrderInput.[Order Taken By], tblOrderInput.OrderID, tblOrderInput.TBAReleaseNumber, tblOrderInput.OrderEntryDate, tblOrderInput.EnteredBy, tblOrderInput.Customer, tblOrderInput.ContactName, tblOrderInput.ContactNo1, tblOrderInput.ContactNo2, tblOrderInput.SiteTitle, tblOrderInput.[Street Address], tblOrderInput.Suburb, tblOrderInput.MapRef, tblOrderInput.DeliveryInstructions, tblOrderInputPrelim.ReqDate, tblOrderInputPrelim.ActualDate, tblOrderInputPrelim.Supplier, tblOrderInputPrelim.Type, tblOrderInputPrelim.SubType, tblOrderInputPrelim.ProductDescription, tblOrderInputPrelim.Qty, tblOrderInputPrelim.Units, tblOrderInputPrelim.NoofPacks, tblOrderInputPrelim.TransportID, tblOrderInputPrelim.SupplierYardNo, tblOrderInputPrelim.SupplierPickupNumber, tblOrderInputPrelim.DateStockOrdered, tblOrderInputPrelim.ScheduledPickupDate, tblOrderInputPrelim.[PrestigeBuyPrice(exGST)], tblOrderInputPrelim.[PrestigeSellPrice(exGST)], tblOrderInputPrelim.[LocalCartage(exGST)], tblOrderInputPrelim.[InterstateCartage(exGST)], tblOrderInput.Comments, tblOrderInputPrelim.JDNumber, tblOrderInput.[Truck Type], tblOrderInput.[Street Address], tblSupplier.Supplier, tblOrderInputPrelim.SupplierID, tblTransport.Transport, tblOrderInputPrelim.InterstateTPTID, tblOrderInputPrelim.InterstateSupplierYard, tblOrderInputPrelim.InterstateSupplierID, tblOrderInputPrelim.JDDriverID, tblOrderInputPrelim.OrderedWith, tblOrderInput.AccountorCashSaleID, tblOrderInput.[Customer Purchase Order ID], tblOrderInputPrelim.StockSource, tblInterstateTransport.InterstateTPT, tblOrderInputPrelim.DelivYorN, tblOrderInputPrelim.ProductAvailDate, tblOrderInput.CancelledOrder, tblOrderInput.DeliveryInstructions, tblOrderInput.JobNo, tblOrderInput.CustomerType, tblOrderInput.MiscellaneousInfo, tblOrderInput.PrimaryContactName, tblOrderInput.ContactNo, tblOrderInput.FaxNo, tblOrderInput.EMailAddress, tblOrderInput.InvoiceAddress, tblOrderInput.InvoiceSuburb, tblOrderInput.State, tblOrderInput.Postcode, tblCustomer.WhoseCustomer, tblOrderInput.CreditCardType, tblOrderInput.CreditCardExp, tblOrderInput.CreditCardNumber, tblOrderInput.POBox, tblOrderInput.Mobile, tblOrderInputPrelim.ProductDescriptionComments, tblOrderInput.TimeofInput, ([PrestigeSellPrice(exGST)]*[Qty])-(([PrestigeBuyPrice(exGST)]*[Qty])) AS Profit, (([PrestigeSellPrice(exGST)]*[Qty])-([PrestigeBuyPrice(exGST)]*[Qty]))/([PrestigeBuyPrice(exGST)]*[Qty]) AS Margin, ([PrestigeSellPrice(exGST)]*[Qty]) AS TotalSell, ([PrestigeBuyPrice(exGST)]*[Qty]) AS TotalBuy
FROM tblCustomer RIGHT JOIN (tblInterstateTransport RIGHT JOIN (tblOrderInput LEFT JOIN (tblTransport RIGHT JOIN (tblSupplier RIGHT JOIN tblOrderInputPrelim ON tblSupplier.SupplierID = tblOrderInputPrelim.SupplierID) ON tblTransport.TransportID = tblOrderInputPrelim.TransportID) ON tblOrderInput.OrderID = tblOrderInputPrelim.OrderID) ON tblInterstateTransport.InterstateTPTID = tblOrderInputPrelim.InterstateTPTID) ON tblCustomer.Customer = tblOrderInput.Customer
WHERE (((tblOrderInput.TBAReleaseNumber) Not Like "*BULK")) OR (((tblOrderInput.TBAReleaseNumber) Is Null));
I also have the following macro run in the "On Open" event:
[Enter Required Entry Date]=[OrderEntryDate] And [CancelledOrder]=False