Results 1 to 3 of 3

Thread: Filter records and show in report

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Mar 2005
    Posts
    174

    Red face 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

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    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?

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Mar 2005
    Posts
    174

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width