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?
JimFaullAsked:
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

me.fieldName=me.openargs

end if

end sub

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

me.fieldName=me.openargs

end if
0
 
slamhoundCommented:
On the modal form, you can reference the main form something like this:
me.SomeField.Value = forms!frmMainform.SomeField.Value
0
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.