Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

In Access 2007. We enter a new record on a form. Then we click a button which has a macro action to open another form. What can I do to make the new form open but linked to the new record? I understand that I need the primary key on the new form etc. If the record was saved I can make the second form open with that data. But My Question is when it's still a new record/form we need to navigate directly onto the linked form...

Please share some direction on this..

share|improve this question
add comment

1 Answer

If the records are related in a parent/child relationship, the usual architecture is to use a subform embedded in the main form, instead of opening up a popup form.

If you insist on the popup form, you could use the DoCmd.OpenForm's OpenArgs argument to pass a value to the popup form. But I consider that bad design form something like this -- the parent/child relationship is better represented with a main form/subform, which means you don't have to pass any information, as the LinkChild/LinkMaster properties take care of the linking data, and the two forms can see each other's data quite easily and reliably.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.