How-To: Form to insert recs in a One-to-Many
I'm building a shipping system that has a one-to-many relationship. I want the user to create the shipping header (who, where, when, etc)....then select all the items on the shipment...then press submit to create the shipment.
So I can create it in two-parts where they enter the header details, insert the rec then create the child records but this it too messy. The primary key between the 2 tables is an autogenerated number. What I want is the user to be able to create it all on one form or via a wizard...but the challenge I can't figure out is how to connect the two since the key is autogenerated. How do I insert the parent, then find the key and then insert the child recs?
Thanks for any guidance!
Thanks,
Erik
|