Thank you both for your answers. I tried June 7 suggestion and unfortunately it is not working. this is what I did. I wrote the following code into the AfterUpdate Event of QtyOrdered.
Code:
PrivateSub QrtOrdered AfterUpdate()
Dim QtyInStock As Integer
QtyInStock = Me!cbofkProductID.Column(3)
If me.NewRecord And Me!QtyOrdered >QtyInStock Then me.Parent!QtyBOrder= Me!QtyOrdered - QtyInStock
End Sub
The QtyOrdered field is in a continuous form with other Fields which are: Product, QtyOrdered, Price, Discount, Subtotal. Product is in a combobox. The problem I have is as follows. under Normal circustances First I enter the Product, then the QtyOrdered, Then It multiplies Quantity X Price to calculate subtotal, and if there is a Discount it calculates it too. Now when I placed the code above in the afterUpdate Event. The following happens. I enter the product, then the quantity and when I press enter the subform goes blank. The QtyBOrdered displays the proper number. The tables don't record the values for subtotal expected it just places a 0. And when I try to exit it says that it can not save the record because somebody else has modified it. When I finally exit the value for the QtyBOrdered is not recorded on the table, it just says 0. If I remove the code then every thing returns to normal. Do you have any ideas of what could be causing this. Thanks for your help