Lookup on fields

I have a form with two fields and one dropdown.on selection of values from dropdown the fields have to be enabled or disabled.Up to this part my code is running properly.Now i want lookup on the two fields on the basis of status field(another field in table),so that only the fields value for open status would be shown in lookup of the field being enabled on the selection from the dropdown…the status field is enum field.