- Joined
- Feb 14, 2012
- Messages
- 2
- Reaction score
- 0
Hi there,
For some time now I'm having the following problem.
I have a main form with contionuous subform (pic1.png). What i want to do is when I change the value of a combobox in the main for to be able to change one of subforms's textboxes. My problem is that I only get the first row to change. I get the folowing error --> shown on err.png
So is there a way to change them all?
Here's my code. I call the function in the combobox's AfterUpdate event:
For some time now I'm having the following problem.
I have a main form with contionuous subform (pic1.png). What i want to do is when I change the value of a combobox in the main for to be able to change one of subforms's textboxes. My problem is that I only get the first row to change. I get the folowing error --> shown on err.png
So is there a way to change them all?
Here's my code. I call the function in the combobox's AfterUpdate event:
Code:
Private Sub calculateWeight()
Me!frmCalculatorDetails.Form!art_id.SetFocus
Me!frmCalculatorDetails.Form!art_qty_scrap.Value = Me!frmCalculatorDetails.Form!art_weight_net.Value * Me.calc_scrap_nonscrap.Value
Me!frmCalculatorDetails.Form!art_weight_gross.Value = Me!frmCalculatorDetails.Form!art_weight_net.Value + Me!frmCalculatorDetails.Form!art_qty_scrap.Value
With Me!frmCalculatorDetails.Form!RecordsetClone
While Not .EOF
Me!frmCalculatorDetails.Form!art_qty_scrap.Value = Me!frmCalculatorDetails.Form!art_weight_net.Value * Me.calc_scrap_nonscrap.Value
Me!frmCalculatorDetails.Form!art_weight_gross.Value = Me!frmCalculatorDetails.Form!art_weight_net.Value + Me!frmCalculatorDetails.Form!art_qty_scrap.Value
If Not .EOF Then .MoveNext
Wend
End With
End Sub
Attachments
Last edited: