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

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?
0
Ernest Grogg
Asked:
Ernest Grogg
  • 3
  • 3
1 Solution
 
Rey Obrero (Capricorn1)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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
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

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

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