Append data to modal form.

I open a modal form to populate a field in another form.  It works well.  I want to go backwards and append the data in the field in the main form to the field for the modal form.  How do I?
Who is Participating?
Rey Obrero (Capricorn1)Connect With a Mentor Commented:
use the openargs

from main form
docmd.openform "modalform",openargs:=me.fieldName

in the load event of modalform

private sub modalform_load()
if len(me.openargs)>0 then


end if

end sub

or you can use
if not isnull(me.openargs) then


end if
On the modal form, you can reference the main form something like this:
me.SomeField.Value = forms!frmMainform.SomeField.Value
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.