Solved

use data from one form to use in another

Posted on 2015-01-21
6
125 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
  • 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
Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

 

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

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

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

Regardless of which version on MS Access you are using, one of the harder data-entry forms to create is one where most data from previous entries needs to be appended to new records, especially when there are numerous fields and records involved.  W…
It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
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…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…

770 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