How to refer to a control on a subform from another subform

mdgibbs88

Registered User.
Local time
Today, 16:41
Joined
Oct 27, 2009
Messages
31
Hi All,

I have 2 subforms on my mainform. I need to get data from a control on subform 2 over to subform1. Can someone help me with the syntax?

Mainform name: frm_restitiutionDataEntry
Subform1 (where I want the data to appear): sfrm_restitutionDetails
control name: decRestAmount
Subform2 (has the control that I want data from): sfrm_restitutionAmt
control name: decRestitution

Any assistance would be greatly appreciated!

Mark G.
 
Code:
Me.[COLOR=Red]ControlName[/COLOR].Value = Me.Parent.[COLOR=Red]Subform2[/COLOR].[COLOR=Red]ControlName[/COLOR].Value
I hope you're not saving calculated values or duplicating them either.

The left hand side is for Subform1 and the right is (obviously) for Subform2.

Amend only the bits in red.
 
No, not trying to move calculated values, but I sort of painted myself into a corner and ended up with 2 subforms on my mainform against my better judgement. Now that I am at this point, I want to make it work and I plan on streamlining my process before rolling it out to the users.

I am off to try your suggestion!

Thanks!
 

Users who are viewing this thread

Back
Top Bottom