I am new to Access VBA, slowly building up knowledge, and having trouble getting an On Click Update Event using RunSQL to work.
I have a form bound to the Card Description table1 to get the Onhand_Stock value, as long the Product name meets then it will get the value from the Vault_Stock location.
This transaction works fine.
From the form I created.
Current_Stock = Onhand_Stock - Transaction_QTY
Once the Current_Stock is already updated from the form transaction, I need to get back to the Card Description table1 and update the existing record from the result value I have on the Current_Stock. But the problem is I have some difficulties to updates the existing record (On-hand) right after current_stock is updated.
Based on my understanding I need to use DoCmd.RunSQL UPDATE after right below condition
If cboStockLocation = "VAULT_STOCK" Then ???
But I don't where to start.
Any help appreciated.
I have a form bound to the Card Description table1 to get the Onhand_Stock value, as long the Product name meets then it will get the value from the Vault_Stock location.
This transaction works fine.
From the form I created.
Current_Stock = Onhand_Stock - Transaction_QTY
Once the Current_Stock is already updated from the form transaction, I need to get back to the Card Description table1 and update the existing record from the result value I have on the Current_Stock. But the problem is I have some difficulties to updates the existing record (On-hand) right after current_stock is updated.
Based on my understanding I need to use DoCmd.RunSQL UPDATE after right below condition
If cboStockLocation = "VAULT_STOCK" Then ???
But I don't where to start.
Any help appreciated.