B
Bob Quintal
Make sure that you have a textbox on the popup that's bound to theI have a form with sub-form. I've decided I want to add mulitple
records associated wth a record on the subform. When I tried to
nest and sub-form in a sub-form I get a notice about not being
able to use "Continuous" in the "middle" form. Grr.
So I've created a pop-up that takes the new data fine however I
can't get the linking field from the sub-form into the table for
the sub-sub-form, that field remains empty.
field in the popup's table. Its .visible property can be false.
In the popup's OnOpen event, add code to test for new record, so you
don't change an existing value, then see if the openargs contains a
value, and set the control to that value.
In the code that opens the form, set the openargs parameter to the
value of the linking field as a string, even if it's numeric.
DoCmd.OpenForm stDocName,,, stWhereClause,,,"'" & me.linkfield & "'"
Form_Open
if me.NewRecord then
iflen(me.openargs) > 0 then
me.linkfield = val(me.openargs)
end if
end if