Done more research and have pared things down to this;
There are two tables: a point of sale table that records all transactions. If a sale includes more than 1 item it creates a row in the POS table for each of the item on the sales ticket, but all have the same receipt number. The second table is a facility table and is joined to the POS table via a transaction code and contains the name of the facility along with other stuff, none of which is germane to the problem.
When I run the following query with a constraint of >0 I get only one answer in the set.
SELECT PUB_PSHISTOR.[PSH-RcptNumb], PUB_PSHISTOR.[PSH-Date], PUB_PSHISTOR.[PSH-DiscAmt], PUB_PSHISTOR.[PSH-TC], [Facility Table].Facility
FROM PUB_PSHISTOR INNER JOIN [Facility Table] ON PUB_PSHISTOR.[PSH-TC] = [Facility Table].[PSC-TC]
WHERE (((PUB_PSHISTOR.[PSH-RcptNumb])=2330461) AND ((PUB_PSHISTOR.[PSH-Date]) Between #5/1/2011# And Now()) AND ((PUB_PSHISTOR.[PSH-DiscAmt])>0));
The same query with the >0 constraint produces the correct answer which is two receipt numbers for the two item that were sold
SELECT PUB_PSHISTOR.[PSH-RcptNumb], PUB_PSHISTOR.[PSH-Date], PUB_PSHISTOR.[PSH-DiscAmt], PUB_PSHISTOR.[PSH-TC], [Facility Table].Facility
FROM PUB_PSHISTOR INNER JOIN [Facility Table] ON PUB_PSHISTOR.[PSH-TC] = [Facility Table].[PSC-TC]
WHERE (((PUB_PSHISTOR.[PSH-RcptNumb])=2330461) AND ((PUB_PSHISTOR.[PSH-Date]) Between #5/1/2011# And Now()));
I have talked to the vendor and they don't have an answer. I can work around this but am curious as to why adding a constraint would produce a wrong answer.
Thanks in advance
jpl