I have a form based on a query for viewing and entering data. It is a stock form and I have three fields from the query (Order value, Shipping Supplement and Postage) which are totalled into a Total Cost field. If I try to change one of the values I get an error message saying "you can't assign a value to this object", I close the VB window and everything has actually updated properly. How do I stop the error message as nothing seems to be wrong?
The code for the calculated field is:
Private Sub OrderValue_AfterUpdate()
Me![Amountpaid] = (Me![OrderValue] + Me![ShippingSupplement] + Me![Postage])
End Sub
Private Sub ShippingSupplement_AfterUpdate()
Me![Amountpaid] = (Me![OrderValue] + Me![ShippingSupplement] + Me![Postage])
End Sub
Private Sub Postage_AfterUpdate()
Me![Amountpaid] = (Me![OrderValue] + Me![ShippingSupplement] + Me![Postage])
End Sub
And I have =[OrderValue]+[ShippingSupplement]+[Postage] as the source
The code for the calculated field is:
Private Sub OrderValue_AfterUpdate()
Me![Amountpaid] = (Me![OrderValue] + Me![ShippingSupplement] + Me![Postage])
End Sub
Private Sub ShippingSupplement_AfterUpdate()
Me![Amountpaid] = (Me![OrderValue] + Me![ShippingSupplement] + Me![Postage])
End Sub
Private Sub Postage_AfterUpdate()
Me![Amountpaid] = (Me![OrderValue] + Me![ShippingSupplement] + Me![Postage])
End Sub
And I have =[OrderValue]+[ShippingSupplement]+[Postage] as the source