Hi Jerry,
Thanks for responding. I should have thought to send the SQL with my
original post. The first SQL is for the basic query that works:
SELECT tblTransactionRequest.TransactionID, tblTransactionRequest.Division,
tblTransactionRequest.Product, tblRequestor.RequestorName,
tblRequestor.Function
FROM tblRequestor INNER JOIN tblTransactionRequest ON
tblRequestor.RequestorID = tblTransactionRequest.Requestor
WHERE (((tblRequestor.Function)=[Enter function]));
This next SQL is for the query with problems:
SELECT tblTransactionRequest.TransactionID, tblTransactionRequest.Division,
tblTransactionRequest.Product, tblRequestor.RequestorName,
tblRequestor.Function, tblTransactionRequest.ReasonCode,
tblTransactionRequest.TotalOriginal, tblInvoiceLines.Quantity,
tblInvoiceLines.[Unit Price], tblTransactionRequest.InvoiceRequest,
tblTransactionRequest.CreditRequest, tblTransactionRequest.ForcedCreditRequest
FROM (tblRequestor INNER JOIN tblTransactionRequest ON
tblRequestor.RequestorID = tblTransactionRequest.Requestor) INNER JOIN
tblInvoiceLines ON tblTransactionRequest.TransactionID =
tblInvoiceLines.TransactionID
GROUP BY tblTransactionRequest.TransactionID,
tblTransactionRequest.Division, tblTransactionRequest.Product,
tblRequestor.RequestorName, tblRequestor.Function,
tblTransactionRequest.ReasonCode, tblTransactionRequest.TotalOriginal,
tblInvoiceLines.Quantity, tblInvoiceLines.[Unit Price],
tblTransactionRequest.InvoiceRequest, tblTransactionRequest.CreditRequest,
tblTransactionRequest.ForcedCreditRequest, tblTransactionRequest.RequestDate
HAVING (((tblTransactionRequest.Division)=550) AND
((tblRequestor.Function)=[Enter Funtion]) AND
((tblTransactionRequest.ReasonCode)<>"Manual Invoice") AND
((tblTransactionRequest.RequestDate) Between [Start date of report] And [End
date of report])) OR (((tblTransactionRequest.Division)=571))
ORDER BY tblTransactionRequest.Division, tblTransactionRequest.Product;
I hope it is something simple that was overlooked. Please advise.
Sincerely,
Jim
Jerry Whittle said:
There's only one practical way for us to know: Show us the SQL. Open the
query in design view. Next go to View, SQL View and copy and past it here.
Information on primary keys and relationships would be a nice touch too.
--
Jerry Whittle, Microsoft Access MVP
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.
:
I have a database that tracks all credits issued by our department. My
supervisor's report needs to separate data by orders and renewals (which I
record in a field called function).
I created a simple query that limits the function by either "orders" or
"renewals". When running this query, everything runs as it should.
Unfortunately, with the more complicated queries (that manipulate more
complex data for reporting), the functions get mixed up.
For some reports the effects are only a few records and for others, many
records are affected. I originally was limiting the function with a
user-entered parameter. However, even when I specify one or the other on the
query, things get jumbled.
Has anyone seen or heard of something like this? Any advice would be
qreatly appreciated.
Thank you,
Jim