Hi,
I have a table (Stock) important field are partsNo., des, qty, pPrice, sPrice, qtyBuy. I make a query based on the table and has one more field SAB(qty+qtyBuy) . I made a form based on the query. User can enter data in any field. When I enter data in ‘qtyBuy’ field I can see the added value by SAB field.
My obligation is to set this value into stock table in qty field. To perform this action I run an action query in a macro in qty field after update event on the form. But when I run the macro, I receive a message ‘Writing Conflict’. If I press ‘save record’ all data are saved expect running macro but if I press copy to clipboard only macro related field(qty in stock table) is updated other fields don’t update.
Please give me a guide what can I do?
Query code is:
“SELECT Stock.partsNo, Stock.des, Stock.qty, Stock.pPrice, Stock.sPrice, Stock.qtyBuy, nz([Stock]![qty])+nz([Stock]![qtyBuy]) AS SAB
FROM Stock;”
Macro code is:
“UPDATE Stock SET Stock.qty = [Forms]![Add Parts]![SAB]
WHERE (((Stock.partsN o)=[Forms]![Add Parts]![partsNo]))”
I have a table (Stock) important field are partsNo., des, qty, pPrice, sPrice, qtyBuy. I make a query based on the table and has one more field SAB(qty+qtyBuy) . I made a form based on the query. User can enter data in any field. When I enter data in ‘qtyBuy’ field I can see the added value by SAB field.
My obligation is to set this value into stock table in qty field. To perform this action I run an action query in a macro in qty field after update event on the form. But when I run the macro, I receive a message ‘Writing Conflict’. If I press ‘save record’ all data are saved expect running macro but if I press copy to clipboard only macro related field(qty in stock table) is updated other fields don’t update.
Please give me a guide what can I do?
Query code is:
“SELECT Stock.partsNo, Stock.des, Stock.qty, Stock.pPrice, Stock.sPrice, Stock.qtyBuy, nz([Stock]![qty])+nz([Stock]![qtyBuy]) AS SAB
FROM Stock;”
Macro code is:
“UPDATE Stock SET Stock.qty = [Forms]![Add Parts]![SAB]
WHERE (((Stock.partsN o)=[Forms]![Add Parts]![partsNo]))”
Comment