Hi... Anyone can help

I have created a Detail View for Product... there is 2 drop down field...

Category - XX
Sub-Category -- XX

In the SubCategory Table, user need to enter the subcategory code and select the category code too. In other words, One Category has many subcategory code.

In the Detail View, I want the user after select the Category and the SubCategory Code only show those record related the the Category.

How to make use of the filter to make the task successfully?