Simple Data Calculation Help

Jaxson

Registered User.
Local time
Today, 07:38
Joined
Jul 8, 2008
Messages
22
Hey,

I have 3 subforms within a form. The first two subforms pulls data from their own databases and calculates the weight of a shipment, displaying it through a textbox. I then want the third subform to display the difference in the two calculated shipment weights but I don't know how to access the data in the other two subforms. Can you please help?

Thanks
 
Hmm...I tried using those lines of code but I couldn't get it to work. Could you or someone elaborate more on my problem. I am fairly new to Access.
 
What is wrong?? I mean much more clear than that list I cannot make it.

To retrieve a value of a control (textbox) on a subform use:
Me!Subform1.Form!ControlName
 
I honestly started Access literally a week ago.

So I have subform1 and subform2 in a mainform, each with a weight that they have computed. If the txt box in my mainform is named WeightDiff, to get it to calculate the diff in the two subforms is this right?

Private Sub WeightDiff_BeforeUpdate(Cancel As Integer)

WeightDiff = (Me!Subform1.Form!ControlName - Me!Subform1.Form! ControlName)

End Sub

Thanks for your help in advanced.
 
Pbaldy, Thank you so much. It worked.

You just significantly helped a huge group of people.
 
No problem Jaxson; happy to help.
 

Users who are viewing this thread

Back
Top Bottom