Hi,
You reset the fields in the table that is bound to the control in the
form and then refresh the form.
' consider the case where the form is dirty, ie. some modifications have
not yet been saved
If Me.Dirty then
Select Case MsgBox("Save pending changes [OK], " & vbCrLf & _
" or Undo them [Cancel] before continue? ", _
vbOKCancel, "Pending changes not yet saved")
Case vbOk
Me.Dirty=false
Case vbCancel
Me.Undo
Case Else
Debug.Assert False 'code execution should not be here,
' have I changed the MsgBox possible results?
' without having change the Select Case statement?
End Select
End If
' Reset to 0 all the records in the table
CurrentDb.Execute "UPDATE tableName SET fieldName=0", dbFailOnError
' refresh the form to get back those new zeros
Me.Refresh
Hoping it may help,
Vanderghast, Access MVP