The following is one way to accomplish this:
1. Ensure your Form's Record Source is a Query.
2. Insert a Command Button in the Form Header section.
3. Use VBA or Macro to perform the following Actions from the Command Button's OnClick Event:
a) Save the Current Record.
b) Run the following SQL statement:
Code:
UPDATE FormQueryName SET FormQueryName.CurrentStock = [MyCount], FormQueryName.MyCount = 0;
- Change "FormQueryName" in the SQL statement (3 instances) to read: Name of your Form's Query
c) Use the Requery command to refresh your Form.
A quick sample of an Access 2007 database (inside zip file) is attached.
Hope this helps.
-RC