in the click of a button
private sub Btn_click()
with me.recordset
.movefirst
do until .eof
CurrentDb.Execute "update tblInvoiceDetail set DedRemCaptured=" & Me.CurrentDedRemain & ",CaptureDate=Now() where [SystemID]='" & Me.[SystemID] & "' and DedRemCaptured Is Null"
.movenext
loop
end with
end sub