use data from one form to use in another

Hello,

Is there a way to save an unbound form data, close that form, open the new form and put that data into the proper fields.

It contains two fields currently

Don't know even where to start.   Dont want to hide the form but load it in memory? Or save it via VBA and put it in the form that way?
Ernest GroggAsked:
Who is Participating?
 
Rey Obrero (Capricorn1)Connect With a Mentor Commented:
you can pass the information from form A to form B by opening form B with OpenArgs option

from form A
docmd.openform "B",openargs:=me.field1 & "|" & me.field2

then in the load event of form B
private sub form_load()

if me.openargs & ""<>"" then
   me.field1=split(me.openargs,"|")(0)
  me.field2=split(me.openargs,"|")(1)
end if

end sub
0
 
Ernest GroggAuthor Commented:
At what point would I close form A
0
 
Rey Obrero (Capricorn1)Commented:
you can close form A after the command to open form B

docmd.openform "B",openargs:=me.field1 & "|" & me.field2
docmd.close acform, "A"
0
Cloud Class® Course: MCSA MCSE Windows Server 2012

This course teaches how to install and configure Windows Server 2012 R2.  It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).

 
Ernest GroggAuthor Commented:
I don't want to be a bother, but can you tell me how this works?  Never used this before and don't know now the "|" works or the usage of it?
0
 
Ernest GroggAuthor Commented:
This is awesome!  thanks so much!
0
 
Rey Obrero (Capricorn1)Commented:
"|" is just a separator for the two fields. it can be ":", ";"  etc..
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.