Here you go. I keep getting prompted for Customer? which is correct, but it
also prompts me for Discount Total. I leave it blank, hit enter and it
works. How do I get rid of Discount Total prompt?
Order Query 1:
SELECT tblOrder.CustomerID, tblOrder.AccountID, tblOrder.InvoiceNum,
tblMaster.First, tblMaster.Middle, tblMaster.Last, tblOrder.SellersFee,
nz([PurchaseAmt],0) AS PurchaseAmt1, nz([Percent],0) AS Percent1,
CCur(Format(([PurchaseAmt1]*([Percent1]/100))/2,'Standard')) AS
LineItemSubtotal
FROM tblMaster INNER JOIN (tblOrder LEFT JOIN tblOrderDetail ON
tblOrder.InvoiceNum=tblOrderDetail.InvoiceNum) ON
tblMaster.AccountID=tblOrder.AccountID
WHERE (((tblOrder.CustomerID)=[Customer?]) And ((tblOrder.InvoiceTypeID)=1))
Or (((tblOrder.InvoiceTypeID)=1) And (((tblOrder.CustomerID) Like
[Customer?]) Is Null))
ORDER BY tblOrder.InvoiceNum;
Order Query2:
SELECT DISTINCTROW [OrderQuery1].CustomerID, [OrderQuery1].AccountID,
[OrderQuery1].InvoiceNum, [OrderQuery1].First, [OrderQuery1].Middle,
[OrderQuery1].Last, [OrderQuery1].SellersFee,
Sum([OrderQuery1].LineItemSubtotal) AS [Discount Total],
[SellersFee]+[Discount Total] AS [Invoice Total]
FROM [OrderQuery1]
GROUP BY [OrderQuery1].CustomerID, [OrderQuery1].AccountID,
[OrderQuery1].InvoiceNum, [OrderQuery1].First, [OrderQuery1].Middle,
[OrderQuery1].Last, [OrderQuery1].SellersFee, [SellersFee]+[Discount Total]
ORDER BY [OrderQuery1].InvoiceNum;
"Roger" <le*********@natpro.com> wrote in message
news:8c**************************@posting.google.c om...
can you post the two queries ?
"MX1" <mx*@mx1.abc> wrote in message
news:<3M1Qb.101763$Rc4.684691@attbi_s54>...
I have query2 that sums a set of fields from query1. Works fine.
However, when I try to add two of the calculated fields from query2, I get
prompted for the label I gave the fields. I just hit enter and it gives me my
data. Any thoughts regarding why I'd get prompted for the field name on a
caluclated field when I try to use it in another calcuated field?
thanks! :)