How do I get the master field to populate when adding a record?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a command button to open a form and it is linked by one field. It is
pulling just the records that I want, but when I try to add a new record, it
does not populate the linked field like it does in a true subform.
 
I have a command button to open a form and it is linked by one field. It is
pulling just the records that I want, but when I try to add a new record, it
does not populate the linked field like it does in a true subform.

Well... that's because it's not a subform!

If you really need the separate popup form, pass the value of the
linking field in the Form's OpenArgs parameter. In the form's Open
event, set the DefaultValue property of the ID field to the OpenArgs
value.

John W. Vinson[MVP]
 

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

Back
Top