Hi i'm working on storing shoes so each article number had a size , and in my database i'm working that every article had different sizes, and since each article had max 5 sizes for example , i added 5 fields to the item table (st_q1,...st_q5 )
here is the item table (article,price, totStock,st_q1, st_q2,st_q3,st_ q5)
i'm working on the form to enter items to stock by quantity sizes.that form contain txtArticle bound to Article in OrderDetail table. and 7 check boxs
the 1st one represent the total quantity need to be entered ( txtQuantity) and it's bound to the totQty in the table OrderDetail. the second one represent the total stock of that article txtStock bound to the field StockQty in item table.and the 5 txt box represents the quantity of article for each size (txtq1, txtq2, txtq3, txtq4, txtq5).
so in this form i have one txtTot bound to a field in a table, and 5 others txtq1, txtq2, txtq3, txtq4, txtq5. i want to be able to just enter qty = txtTot , not less or more that txtTot,
i tried this validation rule on txtq1, txtq2, txtq3, txtq4 and txtq5:
this just make sure that i dont enter a sum(qi)>txtTot
but that dont work if the sum(qi) < txtTot, cause if sum(qi) < txtTot the record still save in the database. any help please !
here is the item table (article,price, totStock,st_q1, st_q2,st_q3,st_ q5)
i'm working on the form to enter items to stock by quantity sizes.that form contain txtArticle bound to Article in OrderDetail table. and 7 check boxs
the 1st one represent the total quantity need to be entered ( txtQuantity) and it's bound to the totQty in the table OrderDetail. the second one represent the total stock of that article txtStock bound to the field StockQty in item table.and the 5 txt box represents the quantity of article for each size (txtq1, txtq2, txtq3, txtq4, txtq5).
so in this form i have one txtTot bound to a field in a table, and 5 others txtq1, txtq2, txtq3, txtq4, txtq5. i want to be able to just enter qty = txtTot , not less or more that txtTot,
i tried this validation rule on txtq1, txtq2, txtq3, txtq4 and txtq5:
Code:
[q1]+[q2]+[q3]+[q4]+[q5]+[q6]+[q7]+[q8]+[q9]+[q10]<=[quantity]
but that dont work if the sum(qi) < txtTot, cause if sum(qi) < txtTot the record still save in the database. any help please !
Comment