Hi there!
I have a Form/Subform that i'm trying to add some buttons to-
The form links to tblProducts with all the product information and the subform links to tblStocktake and stores a quantity value for 3 stocktake locations and are linked together and working just fine.
What I want to do is add +(plus) and -(minus) buttons next to the stocktake fields on the subform to add or subtract 1 to the quantity.
So far I have created the buttons on the subform and have failed.
I have the button attached via VBA to a query -
the problem is the query updates ALL the records on tblStocktake to +1 - not just the one selected in the form/subform.
plus1
I hope this is something painfully simple?!
I'm trying to teach myself and the learning curve is more like a right angle. 
I have a Form/Subform that i'm trying to add some buttons to-
The form links to tblProducts with all the product information and the subform links to tblStocktake and stores a quantity value for 3 stocktake locations and are linked together and working just fine.
What I want to do is add +(plus) and -(minus) buttons next to the stocktake fields on the subform to add or subtract 1 to the quantity.
So far I have created the buttons on the subform and have failed.
I have the button attached via VBA to a query -
the problem is the query updates ALL the records on tblStocktake to +1 - not just the one selected in the form/subform.
Code:
Private Sub plusbtne_Click()
DoCmd.OpenQuery "plus1", acNormal, adedit
Me.Form.Repaint
Me.Form.Requery
End Sub
Code:
UPDATE tblstocktake SET tblstocktake.StockEnv = ([StockEnv]+1);