Hi,
Im having an issue that I'm hoping somebody could help with?
I have a main form called frmDetails, on this form there are a number of textfields, with one in particular that I use quite a bit, this is called Total, with adds values together from the other textfields and displays the total.
I also have a sub form on the frmDetails, called SubDetails which is based on a query., the query allows me to enter a code on frmDetails and populates the form and subform with the data with the matching code. so for example if i use code 321, it brings back all data related to that code (which is unique)
On the subform I need to divide the Total from the main form and display the answer in the sub form subTotal, I can get this to work one row at a time but the OnClick event in the SubTotal textfield event.
But I need to allow the subform to update all rows under the column SubTotal at the same time depending on the quantity in the quantity column. this is the code i have at the moment for the OnClick event:
I've tried inserting the calculation on the OnExit event for Total (frmDetails) but again this only updates row 1 instead of all rows. My subform is as follows:
Can anybody help me?
Im having an issue that I'm hoping somebody could help with?
I have a main form called frmDetails, on this form there are a number of textfields, with one in particular that I use quite a bit, this is called Total, with adds values together from the other textfields and displays the total.
I also have a sub form on the frmDetails, called SubDetails which is based on a query., the query allows me to enter a code on frmDetails and populates the form and subform with the data with the matching code. so for example if i use code 321, it brings back all data related to that code (which is unique)
On the subform I need to divide the Total from the main form and display the answer in the sub form subTotal, I can get this to work one row at a time but the OnClick event in the SubTotal textfield event.
But I need to allow the subform to update all rows under the column SubTotal at the same time depending on the quantity in the quantity column. this is the code i have at the moment for the OnClick event:
Code:
me.SubTotal = Forms!frmDetails!Total / me.Quantity
Code:
ID | Quantity | SubTotal | Cost
1 1200 15
2 1300 16
3 1400 17