J
John B
In a form called "Order" I have a text box to count the number of product
of the subform "Product_List":
=[subform Product_List].Form.RecordsetClone.RecordCount
and it works: for example 3.
On the same form "Oder" I have another subform named "subform_Product_Oder"
and if is possible, I would like that, when I select the description
"Shipment Fee", in the field "Quantity" appear the same value of above, in
this case 3 (Total of Product List)
I tried the following code, on the BeforeUpdate event of "Quantity" text
box, but it doens't work. Any help please?
Private Sub Quantity_BeforeUpdate(Cancel As Integer)
Dim PTotal As Long
PTotal = DCount("ProductID", "Subform Product_Order", "")
If Me!Description = "Shipment Fee" Then
Me!Quantity = PTotal
End If
End Sub
Thanks for Your help.
Regards
John
of the subform "Product_List":
=[subform Product_List].Form.RecordsetClone.RecordCount
and it works: for example 3.
On the same form "Oder" I have another subform named "subform_Product_Oder"
and if is possible, I would like that, when I select the description
"Shipment Fee", in the field "Quantity" appear the same value of above, in
this case 3 (Total of Product List)
I tried the following code, on the BeforeUpdate event of "Quantity" text
box, but it doens't work. Any help please?
Private Sub Quantity_BeforeUpdate(Cancel As Integer)
Dim PTotal As Long
PTotal = DCount("ProductID", "Subform Product_Order", "")
If Me!Description = "Shipment Fee" Then
Me!Quantity = PTotal
End If
End Sub
Thanks for Your help.
Regards
John