Sub-field in Form

D

Denise

Hello,

I have built a form and in in I have a combo box. Next to it I have a
another combo box that acts as a sub-field to the first. In control source I
used the formula :
SELECT DISTINCTROW Sub_Categories.SubCat FROM Sub_Categories WHERE
(((Sub_Categories.Cat)=Forms!Incoming_Call!Cat)) ORDER BY
Sub_Categories.SubCat;

Everything works fine when you first open the form and make your selection
in the first field. (It displays all of the right categories) however If you
make another selection (If you made a mistake or choose to add another
record) it doesn't display the right categories.

Is there a property I am missing or something I need to add to my statement?
Is there a better way to accomplish this?

Thank you for your help,

Denise
 
O

Ofer

On the after update event of the first combo you should refresh the second
combo
In the code enter the line (Chose code in the properties, dont put it in the
line of the properties)
me.Combo2Name.requery
 
Top