Solved

use data from one form to use in another

Posted on 2015-01-21
6
128 Views
Last Modified: 2015-01-21
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
Comment
Question by:Ernest Grogg
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
6 Comments
 
LVL 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 500 total points
ID: 40562411
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
 

Author Comment

by:Ernest Grogg
ID: 40562452
At what point would I close form A
0
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 40562474
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
PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

 

Author Comment

by:Ernest Grogg
ID: 40562512
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
 

Author Closing Comment

by:Ernest Grogg
ID: 40562545
This is awesome!  thanks so much!
0
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 40562564
"|" is just a separator for the two fields. it can be ":", ";"  etc..
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
This article describes two methods for creating a combo box that can be used to add new items to the row source -- one for simple lookup tables, and one for a more complex row source where the new item needs data for several fields.
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question