![]() |
Sergey Kornilov admin 3/28/2011 |
I guess you need to use BeforeAdd event of Parts table. $sql="update inventory set quantity_on_hand = quantity_on_hand + " . $values["units"] . " where inventory_id = " . $values["inventory_id"];
|
R
|
rlee6087 author 3/29/2011 |
Ok, here is the code I added, the correct field name in inventory is quanity_on_hand, yes I know spelled incorrect however, to late to change now, everything points to that name. Anyway here is the code |
![]() |
Sergey Kornilov admin 3/29/2011 |
It looks like $values["part_no"] is empty. Make sure field name spelled properly. Another thing - if part_no is a key column use $keys["part_no"] instead. |
R
|
rlee6087 author 3/29/2011 |
Tried, the keys and triple checked spelling, same thing. I took the where clause off and it didnt give any errors however it, deleted that amount entered from every row of the quanitiy_on_hand column. So it appears to be something in the where clause. |
![]() |
Sergey Kornilov admin 3/29/2011 |
I would suggest to post your application to Demo Account and open a ticket at http://support.xlinesoft.com sending your Demo Account URL. 'Demo Account' button can be found on the last screen in the program. |
R
|
rlee6087 author 3/30/2011 |
Thank you so much Jane, it works perfectly. |