pop-up form

S

short

I have a Main form and a Subform with a Subform on it. I want to create a
pop-up form on the 2nd Subform and when it pops up I want the 2nd Subform's
PK (which is a number) to be automatically put into the pop-up form. Is there
a way of doing this?

The reason for the pop up is the information isn't always required or can be
added later on.

Thanks
 
B

Brian

Set the default value of a control on the popup form to refer to the PK's
control on the subform, like this:
=Forms.MainFormName.SubFormName.Form.PKControlName

Substitute MainFormName with the name of your main form, SubFormName with
the name of the subform, and PKControlName with the name of the control on
the subform.

You might as well make the control hidden on the pop form, since there is no
reason for the user to see it.

Also, if they both affect the same record, be careful to force a record save
before the popup form opens, or a user may start a new record on the subform,
then click the popup before it is saved, and the popup form will have no
existing record to update.
 

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