Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Prob to filter record for Field1 and Field2 with same RefNo as Field1.

Status
Not open for further replies.

awinnn

MIS
Jul 21, 2003
166
MY
Hi,
I have Code, RefNo and Amount. Code has value (HS, HOSPSP, HOSPIR, HOSPCH). I've set the criteria on Code like this,
In("HS","HOSPIR").

My problem is to display record for HS and HOSPIR(only with the same RefNo with HS). It is because..there are some HOSPIR with the same RefNo as HOSPSP and HOSPCH. Is it possible?

thanx in advance..:)
 
Hello awinnn,
I would try a query if there is more than one record given. Another way is a Dlookup. but this is useally for looking for 1 record.
Just a thought
Mark
 
If I understand you correctly you might try this:

Select Code, RefNo, Amount
From TableX
Where Code In ("HS","HOSPIR") And RefNo In
(Select RefNo From TableX Where Code = "HS")

Good Luck

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top