lookup in form

i need to create a lookup in a from. tha requirement is form containing two controls InvoiceAccount and InvoiceId. if we select a InvoiceAccount in the form control, after that if we clicked on the lookup of InvoiceId control all invoiceIds should come in lookup those are corresponding to InvoiceAccoint what we selected in the InvoiceAccount control.

i tried in many ways but i couldn’t. can any one send me the code and describe where we need to write that code.?

Can any one help me please.