Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2009

    Question Unanswered: Help Display Product List With Multiple Categories Inside Listbox

    Hi all, sorry for my bad English, and this is my first post.

    Here is my story.
    Basically Data input from browser by mySQL and PHP, with many detail.
    But if we want to edit all the price will take long time to finish. So i choose Access to edit just a view important data.
    Like Price, and SKU. So i can see which manufacture, what SKU, price and each product have multiple categories.
    I already display product list with name, SKU, price, manufacture name.

    The problem is, i cant display each product's multiple categories in Listbox i made.
    Because 1 product have 2 or 3 categories, maybe more.
    So in the listbox i just want to show only each products' categories and i dont want to edit the categories.
    How can we display each product's categories?

    I'm using Continuous Forms
    Anything you can change except mySQL database fields.
    I understand mySQL just little, and i'm new in Access.

    I already attach 5 files:
    3 images (relationships, form design, form view)
    1 mySQL data
    1 mdb

    Actualy, in PHP, the query between product list and category is separated.

    First, PHP query the product list, then in PHP script, when it list the product rows, it query category_name and take product_id from product.
    Here is from PHP:

    PHP Code:
     $db_cat->query("SELECT #__{vm}_category.category_id, category_name FROM


          WHERE #__{vm}_category.category_id=#__{vm}_product_category_xref.category_id

          AND #__{vm}_product_category_xref.product_id='"
    .$db->f("product_id") ."'");

    $db_cat->next_record()) {

    $tmpcell .= $db_cat->f("category_name") . "<br/>";

    See image below, if missing, see my attachment for product listing looks like. I mark it with red.

    And my plan is like image below.
    Its not real, i edit with PhotoShop, to make more easy to explain.
    Microsoft Access 2000
    mySQL 5.0.45
    ODBC Driver 3.5 and 5.1
    Attached Files Attached Files

  2. #2
    Join Date
    Oct 2009
    mmm not in Access; I see you having records 7 thru 19 but in record 19 you are trying to have 3 sub records for that one field...

    you can do that in single forms but not continuous forms...

    you can do it in Reports....where you would actually have ~21 records but use Grouping to make it grouped into records 7-19

  3. #3
    Join Date
    Dec 2009
    Actually, i need contibuous form. Or maybe we can output the categories itu 1 single textbox? I just need to show, not to edit.

Posting Permissions

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