Main form/Subform >> add details on separate form. How?

J

Jon

I have a main form with a subform and I want to click a command button
to add a new record in the subform by using a separate form for the
details. When work on that record is completed and the form is closed,
the details should now appear in the subform of the main form.

How do I get the separate detail form to open, show the current record
of the main form, and be ready to add new details?

Thanks.
 
G

Guest

Hi Jon,

Why not allow your users to add/update data directly in the subform?

Anyway, if you want a new form to open, simply design the new form, and open
it using a command button. You will need to link it back to the main form,
so have a Before Insert event to grab the ID from your main form and record
it in the appropriate field in your data entry form.

Then, when you close your data entry form, use
forms!frmMAINFORM.SUBFORM.form.requery to force a refresh of your original
subform.

Hope this helps.

Damian.
 
J

Jon

Damian,
Thank you for your response. Could you give me a little (a lot) more
detail on the solution?

I want to open a separate detail form form because the information will
be much more than could be placed in the subform where all I want to
see is the date and a portion of the detail.

I need to be able to open that detail form ready for new details with
the current record on the main form already entered.

Thanks again
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top