Filter records and show in report
Hi all
I have got a db in Access. There are several catagory of material vendors can supply. A vendor can supply more than one category of material. The category of material supplied by a vendor is stored in a field called supplytype with comma seperation. How can I filter and show a report if the query is based on category. Foe example:
Suppose
Company1 is supplying categoryA and categoryB
Company2 is supplying categoryA and categoryC
Company3 is supplying categoryB and categoryC
Now if I want to show in a report who are the vendors sypplying categoryA then what will be the code. Can anybody help me?
Thanking you all
Re: Filter records and show in report
Well, the SQL for such a query would be something like:
Code:
Dim sSQL As String
sSQL = "SELECT company FROM table WHERE supplier = 'CategoryA'
You mentioned Access. Are you doing this all in Access, or do you have a VB front end?
What is your reporting tool?
Re: Filter records and show in report
Thanks for the reply. The reporting tool I am using is the datareport. Thing is that I am saving the materials supplied by a vendor in the supply field with a comma seperator if more than one material is supplied. So I have to track every vendor suppling a particular material keeping in mind the fact that a vendor can supply the said material as well as any other material. That is the problem I can't resolve to show all the vendors suppling a particular material and show them in a datareport.
I am using Access as backend and VB 6.0 as front end.