[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 137
  • Last Modified:

Display a value from another form

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
Jass Saini
Asked:
Jass Saini
  • 4
  • 3
1 Solution
 
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
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
 
Jass SainiAuthor Commented:
My fields are unbound as I have a calculation in them...so how do I refer back to the field..field name???
0
 
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
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
Transaction-level recovery for Oracle database

Veeam Explore for Oracle delivers low RTOs and RPOs with agentless transaction log backup and transaction-level recovery of Oracle databases. You can restore the database to a precise point in time, even to a specific transaction.

 
Jass SainiAuthor Commented:
So I have the field in my subform..and it's saying the it can't find the referenced form ....
0
 
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
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
 
Jass SainiAuthor Commented:
When you say subFormCONTROL...what does that mean??
0
 
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
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

NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

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