I have a problem here. I have 2 tables: requisition form and requisition item. When I click the requisition link, a new auto-generated no will be created. Then I will add the items it. The reason why I made 2 tables here because in one requisition form, there is only ONE requester, date and running no. Other reason it is more managable. When I want to view all item under one requisition form, the problem the total record will come out double or triple. Example, existing form got one item, when I add another one, it should be 2 but what comes out is 4. When I add another one, it becomes 6. When I view it from the database, it is correct no of records. What come out is duplicate data.
Example
my requisition form field
running_no
1
my requisition item field
stock_code running_no
221010 1
102088 1
My Output
running no: 1
stock code
221010
102088
102088
221010
My sql is like that
sql = "SELECT * FROM requisition_item as rq_item, stock as s, requisition_form as rq_form "
sql = sql & "WHERE rq_item.running_no = '" & session("sOldRunNo") & "' AND rq_item.stock_id = s.stock_id "
Hope you guys can help this one. Thanks.