...Ambiguous Field Reference.....

P

Popparod

....I get a Ambiguous Field Reference when I try a Total Sale.....

.......Sum(CLng([Quantity]*[UnitPrice]*(1-[Discount])*100)/100) AS [Total
Sales]......

.....I tryed to do what they said in the HELPS...but I got other errors....
....Closing parenthesis' and stuff....

....I did get this down pat...!!!
[First Name] & " " & [Last Name] AS MemberName


SELECT DISTINCTROW [Order Details].OrderID, Merchandise.ProductName,
Orders.SaleDate, [Order Details].Quantity, [Order Details].UnitPrice, [AFBA
Members].MemberID, [First Name] & " " & [Last Name] AS MemberName,
Sum(CLng([Quantity]*[UnitPrice]*(1-[Discount])*100)/100) AS [Total Sales]
FROM (Orders INNER JOIN (Merchandise INNER JOIN [Order Details] ON
Merchandise.ProductID = [Order Details].ProductID) ON Orders.OrderID =
[Order Details].OrderID) INNER JOIN [AFBA Members] ON Orders.MemberID =
[AFBA Members].MemberID
GROUP BY [Order Details].OrderID, Merchandise.ProductName, Orders.SaleDate,
[Order Details].Quantity, [Order Details].UnitPrice, [AFBA
Members].MemberID, [First Name] & " " & [Last Name];


.....Thank You for your continued help.....!
....and Happy Holidays to you and Yours....
 
D

Duane Hookom

Do you have a UnitPrice field in both the Order Details and Merchandise
tables? If so, you must dis-ambiguate the field like:

Sum(CLng([Quantity]*[Order Details].[UnitPrice]*(1-[Discount])*100)/100) AS
[Total Sales]
 
P

Popparod

.....Thank You....

.....As usual....it worked....!

.....Gosh I really appreciate that......
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top