• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 370
  • Last Modified:

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?
0
JimFaull
Asked:
JimFaull
1 Solution
 
slamhoundCommented:
On the modal form, you can reference the main form something like this:
me.SomeField.Value = forms!frmMainform.SomeField.Value
0
 
Rey Obrero (Capricorn1)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

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now