V
vincentt via AccessMonster.com
Hi all,
I have FORM link to a QUERY, which I could choose the criteria for searching,
however, hinder by 1 field. The query code as follow:
SELECT DISTINCT studentinfo.sid, studentinfo.slname, order.orderid, wat.
pcfprint, receipt.paid
FROM studentinfo INNER JOIN ([order] INNER JOIN (watusa INNER JOIN receipt ON
wat.orderid=receipt.orderid) ON (order.orderid=wat.orderid) AND (order.
orderid=receipt.orderid)) ON studentinfo.sid=order.sid;
Since in the table of RECEIPT, it might have several RECEIPT NO for 1 ORDER,
some of them may have PAID or UNPAID.
If I specify the SEARCH PAID or UNPAID, it would not have problem, however,
If I perform the search without concerning being PAID or UNPAID, it would
comes out 2 records, with same ORDERID, but 1 is PAID and other UNPAID.
For me, it is a DUPLICATE record, since I only need to SEARCH other Criteria,
e.g. wat.pcfprint = false without concerning PAID or UNPAID.
Could anyone help, how to eliminate the duplicate, instead only show either
PAID or UNPAID?
Thanks in advance!!!!!
I have FORM link to a QUERY, which I could choose the criteria for searching,
however, hinder by 1 field. The query code as follow:
SELECT DISTINCT studentinfo.sid, studentinfo.slname, order.orderid, wat.
pcfprint, receipt.paid
FROM studentinfo INNER JOIN ([order] INNER JOIN (watusa INNER JOIN receipt ON
wat.orderid=receipt.orderid) ON (order.orderid=wat.orderid) AND (order.
orderid=receipt.orderid)) ON studentinfo.sid=order.sid;
Since in the table of RECEIPT, it might have several RECEIPT NO for 1 ORDER,
some of them may have PAID or UNPAID.
If I specify the SEARCH PAID or UNPAID, it would not have problem, however,
If I perform the search without concerning being PAID or UNPAID, it would
comes out 2 records, with same ORDERID, but 1 is PAID and other UNPAID.
For me, it is a DUPLICATE record, since I only need to SEARCH other Criteria,
e.g. wat.pcfprint = false without concerning PAID or UNPAID.
Could anyone help, how to eliminate the duplicate, instead only show either
PAID or UNPAID?
Thanks in advance!!!!!