jon jomaco
Registered User.
- Local time
- Today, 13:53
- Joined
- May 20, 2005
- Messages
- 41
I have a combo box where one customer can be assigned to one order.
The after update event is:
[CreditUsage] = [CreditUsage] + Forms![frmOrders]![OrderTotal]
Refresh
...and the before update event is:
Me.[CreditUsage] = Me.[CreditUsage] - Forms![frmOrders]![OrderTotal]
Refresh
The aim of this is to ensure that when the combo box is changed, so that a customer of a particular ID is not assigned to an order anymore, the credit usage of the customer in question is subtracted from (since the credit which is available to them is no longer used up by this order). After this the new value of the combo box will mean that a different customer is assigned to the order and therefore their credit usage will increase by the total amount of the order.
It seems pretty simple, but unfortunately i'm clearly doing something wrong as the following error message is displayed:
"The value in the field or record violates the validation rule for the record or field... "
There isn't any validation applied to this field so i don't understand what the problem is. Maybe someone can help me out. I apologise in advance if I have explained the problem poorly, i'm new to this sort of thing as you can probably judge by the nature of the question, so please ask if you need clarification.
Any information appreciated
Thanks, Jon.
The after update event is:
[CreditUsage] = [CreditUsage] + Forms![frmOrders]![OrderTotal]
Refresh
...and the before update event is:
Me.[CreditUsage] = Me.[CreditUsage] - Forms![frmOrders]![OrderTotal]
Refresh
The aim of this is to ensure that when the combo box is changed, so that a customer of a particular ID is not assigned to an order anymore, the credit usage of the customer in question is subtracted from (since the credit which is available to them is no longer used up by this order). After this the new value of the combo box will mean that a different customer is assigned to the order and therefore their credit usage will increase by the total amount of the order.
It seems pretty simple, but unfortunately i'm clearly doing something wrong as the following error message is displayed:
"The value in the field or record violates the validation rule for the record or field... "
There isn't any validation applied to this field so i don't understand what the problem is. Maybe someone can help me out. I apologise in advance if I have explained the problem poorly, i'm new to this sort of thing as you can probably judge by the nature of the question, so please ask if you need clarification.
Any information appreciated
Thanks, Jon.