Who can solve this problem....
how to use on dirty function in access
I use this 2 function...
I have 2 textbox for user key in..which is QtyReq and QtyIssued
QtyReq is for user to request how many item they want...that's didn't involve any calculation...a nd for QtyIssued that involve calculation. For example the main stock is 10...then user will put QtyReq 20 and QtyIssued to 10....then user will save it...and the main stock will auto deduct after user put 10 in Qty Issued...Now the stock become 0...Then the problem comes..when user want to update back without seeing the stock have or not...they open back the form that list as pending...which is QtyReq = 20 QtyIssued=10 and still got Balance=10....S o user will open and change the QtyIssued as 20....that goes to the below coding...
After user change the QtyIssued to 20...It will prompt MsgBox and tell user "Out Of Stock"...and it will add 10 in the main stock...how can I solve this problem...??
how to use on dirty function in access
I use this 2 function...
I have 2 textbox for user key in..which is QtyReq and QtyIssued
QtyReq is for user to request how many item they want...that's didn't involve any calculation...a nd for QtyIssued that involve calculation. For example the main stock is 10...then user will put QtyReq 20 and QtyIssued to 10....then user will save it...and the main stock will auto deduct after user put 10 in Qty Issued...Now the stock become 0...Then the problem comes..when user want to update back without seeing the stock have or not...they open back the form that list as pending...which is QtyReq = 20 QtyIssued=10 and still got Balance=10....S o user will open and change the QtyIssued as 20....that goes to the below coding...
Code:
QtyIssued_OnDirty() Dim user As Integer user = Nz(Dlookup("Stock","tableName","ItemCode='" me.ComboBox "'")) If Me.QtyIssued.Value Then DoCmd.OpenQuery "try1", acEdit''Stock+QtyIssued ElseIf user < QtyIssued Then MsgBox "Out Of Stock" DoCmd.Close EndIf
Comment