akssmv:
Re-structure the Sub-Category Object to the following:
SUBCATEGORY_TBL
SUBCATID PK number,
CATEGORYID FK number, /* Comment: Enforce FK Referential Constraint */
SUBCAT_NAME varchar (80)
Also include for Delete operation, to include Cascade Deletes.
Then use the table in you listbox with the following Query:
select DISTINCT a.CATEGORY_NAME, b.SUBCAT_NAME
from CATEGORY_TBL a, SUBCATEGORY_TBL b
where a.CATEGORYID = b.CATEGORYID
orderby b.CATEGORYID, b.SUBCATID
groupby b.CATEGORYID, b.SUBCATID
Hope this helps.
__________________
Disclaimer: The above comments are solely the opinion of one person and not to be construed as a directive or an incentive to commit fraudulent acts.
|