Hello.
I have a subform [frmMeasurements] inside a form [TrspOppdrag].
The subform has the following txtboxes:
*[txtMeaID] - Autonumber
*[txtCopyTrspID] - looks up value from a textbox in main the form called [txtTrspID]
*[txtnumber] - manually input
*[txtlenght] - manually input
*[txtwidth] - manually input
*[txtHeight] - manually input
*[txtWeight] - manually input
*[txtM3] - gets its value from [txtSumM3]
*[txtLM] - gets its value from [txtxSumLM]
*[txtSumM3] - uses NZ to calculate cbm from the above values.
*[txtSumLM] - uses NZ to calculate loading metres from the above values
Several lines may be added to the subform, but it is related to the autonumber [txtTrspID] in my main form, so the values "follows each post".
Both the subform and the main form has its own tables.
This is a fairly easy form/subform assemblage.
Here is my problem:
What I need to happend is; when [txtTrspID] in the main form gets in "focus", all the values under [txtM3] needs to be added and shown in a txtbox in my main form called [txtVolum].
I'm now using the following on focus control "Forms![TrspOppdrag].[txtVolum] = Me.txtSumM3" and this partly does what I want.
The only issue here is that it only shows the first [txtM3] value, and will not add the rest of the [txtM3] values when they exists.
Hopefully this made any sense...
Chris
I have a subform [frmMeasurements] inside a form [TrspOppdrag].
The subform has the following txtboxes:
*[txtMeaID] - Autonumber
*[txtCopyTrspID] - looks up value from a textbox in main the form called [txtTrspID]
*[txtnumber] - manually input
*[txtlenght] - manually input
*[txtwidth] - manually input
*[txtHeight] - manually input
*[txtWeight] - manually input
*[txtM3] - gets its value from [txtSumM3]
*[txtLM] - gets its value from [txtxSumLM]
*[txtSumM3] - uses NZ to calculate cbm from the above values.
*[txtSumLM] - uses NZ to calculate loading metres from the above values
Several lines may be added to the subform, but it is related to the autonumber [txtTrspID] in my main form, so the values "follows each post".
Both the subform and the main form has its own tables.
This is a fairly easy form/subform assemblage.
Here is my problem:
What I need to happend is; when [txtTrspID] in the main form gets in "focus", all the values under [txtM3] needs to be added and shown in a txtbox in my main form called [txtVolum].
I'm now using the following on focus control "Forms![TrspOppdrag].[txtVolum] = Me.txtSumM3" and this partly does what I want.
The only issue here is that it only shows the first [txtM3] value, and will not add the rest of the [txtM3] values when they exists.
Hopefully this made any sense...
Chris