use data from one form to use in another

Posted on 2015-01-21
Last Modified: 2015-01-21

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?
Question by:Ernest Grogg
  • 3
  • 3
LVL 119

Accepted Solution

Rey Obrero 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
end if

end sub

Author Comment

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

Expert Comment

by:Rey Obrero
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"
Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.


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?

Author Closing Comment

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

Expert Comment

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

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

It took me quite some time to sort out all the different properties of combo and list boxes available from Visual Basic at run-time. Not that the documentation is lacking: the help pages are quite thorough and well written. The problem was rather wh…
Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

867 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now