Dynamic Lookup field

Dynamic Lookup field

Hi I have a lookup field (Lookup field 2)  to show entries from another form.   How do I control it to show variable # of entries per value entered in another field  (Lookup field 1)?    On the "on user input" action of the other field (Lookup field 1), how do I generate in real time the # of entries for this look up field (Lookup field 2)?