[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Display a value from another form

Posted on 2015-01-21
7
Medium Priority
?
136 Views
Last Modified: 2015-01-21
I have two forms and I would like to have Field D from Form A to be displayed in Field C in Form B.

Field D is sum calculation ....it's like taking a end total from one form and having it become the starting total for the next form.
0
Comment
Question by:Jass Saini
[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
  • 4
  • 3
7 Comments
 
LVL 85
ID: 40562211
You can refer to another OPEN form like this, from the current form:

Me.[Field C]=Forms![Form A].[Field D]

I'd think you'd put this in the Form's Open, Load or Current event.
0
 

Author Comment

by:Jass Saini
ID: 40562247
My fields are unbound as I have a calculation in them...so how do I refer back to the field..field name???
0
 
LVL 85
ID: 40562280
Did you test my code before posting? If so, does it not work?

Bound or Unbound should not matter. You're referring to the CONTROLS on the form.
0
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.

 

Author Comment

by:Jass Saini
ID: 40562394
So I have the field in my subform..and it's saying the it can't find the referenced form ....
0
 
LVL 85

Accepted Solution

by:
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 2000 total points
ID: 40562410
You failed to mention Subforms.

Are you trying to find a value that is ON a Subform? If so, you must refer to it correctly:

Me.SomeControl = Forms("ParentForm").SubFormCONTROL.Form.NameOfControl

Where "SubFormCONTROL" is the Name of the Subform Control on the Parent form (i.e. the form "hosting" the Subform)
0
 

Author Comment

by:Jass Saini
ID: 40562444
When you say subFormCONTROL...what does that mean??
0
 
LVL 85
ID: 40562710
A Subform CONTROL is a Control you put on a form, just like a Textbox or ComboBox. The Subform Control is a "container" control, since it "contains" other controls - in this case, a Form.

So you put a Subform Control on a Form, and then set the Source Object of that control to show the form you want displayed in the Subform.

If you create the Subform by dragging and dropping one Form onto another, then Access will name the Subform control the same as the form.

If you add a Subform control from the toolbox, Access will name it something like "SubForm1".

In the image below, you'll see a Form with two separate Subform controls. I've highlighted one, and shown the Property Sheet. The value in the "Name" Property is what you use.

Subform
0

Featured Post

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Question has a verified solution.

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

It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
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 how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

650 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