Is there anyway to automatically reduce the quantity of stock. I have set up a table, with a field for the quantity of items in stock. I want to be able to automatically reduce this value at the click of a button, a possible macro???
Q. How is this done?
A. A sales person selects his name from a combo box, then he selects the customers name. Following this he then enters the book(s) ordered by this customer, then the quantity of each needed, and finally the discount. Ideally what I would like is for when the sales person enters the quantity of each book, for the amount in stock (Tbl_books) to be reduced by the amount entered in the qunatity field on the order form. If there are not enough copies of the book available for the order to be completed, then a small message box appears telling the sales person that their are not enough copies left in stock (a possible validation rule). Now this is where it gets tricky. If the sales person enters a incorect value for the quantity of books ordered, i.e. 2 instead of 1, then when he corrects the value, the number of books in stock (Tbl_Books) is to increase by 1.
I have absolutly no idea as to how to approach this, I have attached a printscreen from the relationships page, as well as a printscreen from the order form. Would you like a printscreen from any other table or form?
Relationships:
http://img28.picoodle.com/img/img28/5/11/27/f_Untitled2m_602830c.jpg
Stock Form:
http://img28.picoodle.com/img/img28/5/11/27/f_Untitled1m_0ecc314.jpg
Thanking you in advanced
CJM
Q. How is this done?
A. A sales person selects his name from a combo box, then he selects the customers name. Following this he then enters the book(s) ordered by this customer, then the quantity of each needed, and finally the discount. Ideally what I would like is for when the sales person enters the quantity of each book, for the amount in stock (Tbl_books) to be reduced by the amount entered in the qunatity field on the order form. If there are not enough copies of the book available for the order to be completed, then a small message box appears telling the sales person that their are not enough copies left in stock (a possible validation rule). Now this is where it gets tricky. If the sales person enters a incorect value for the quantity of books ordered, i.e. 2 instead of 1, then when he corrects the value, the number of books in stock (Tbl_Books) is to increase by 1.
I have absolutly no idea as to how to approach this, I have attached a printscreen from the relationships page, as well as a printscreen from the order form. Would you like a printscreen from any other table or form?
Relationships:
http://img28.picoodle.com/img/img28/5/11/27/f_Untitled2m_602830c.jpg
Stock Form:
http://img28.picoodle.com/img/img28/5/11/27/f_Untitled1m_0ecc314.jpg
Thanking you in advanced
CJM