tags:

views:

166

answers:

1

I want to be able to click a button and open a new form for data entry, but the new form needs to have at least one item filled in from the form with the button. The data entry form will also be used for editing, so I can't just reference the first field for all uses of the form.

Take a simple billing system for example: I'm looking at a form that is about a person - name, address, etc. I want to click a button "Receive payment" and have a payment form come up, with the person_id already populated with the right value, ready for data entry and no other records available. OTOH, I may want to use the form from another location to browse or edit all payments.

Am I missing something obvious?

+1  A: 

You can conditionally access the OpenArgs in the Form Load or Open events, and then use the OpenArgs to alert the form that you want it to perform a lookup routine.

If you need help, post what code you have, or your real world situation and I'll be happy to assist you with the details.

David Walker