do not save record

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a form with ontimer event where starts on the first record when it
open, then via a gotonextrecord func to the last record in the recordset.

For every record I want to save the calculated value from Total and
TotaltInbetalt to the bound controls Total2 and TotaltInbetalt2.

Tried the on current below but did not autosave when from one record to
another!


Private Sub Form_Current()
Me!Total2 = Nz(Me!Total)
Me!TotaltInbetalt2 = Nz(Me!TotaltInbetalt)
'DoCmd.RunCommand acCmdSaveRecord
End Sub

Thank you in advance

Mattias
 
Why do you want to save a calculated field?

If you insist on doing so (not recommended to store redundant data) why are
you not using an update query?

Rick B
 
Hi Rick

This form is like a order or invoice with a unique invoicno. When the
invoices are created they have a null value in the fields Total2 and
TotaltInbetalt2 (=paid up to now) in the table.
This is because there is a lot of manual hands on and unique handling of
each invoice. One invoice can have 50 part payments, ex: 2 can be cash, one
partpayment can be credit card with adding a % fee to the total2, next can be
a partpayment in another currency adding adding a % fee (for the excange) to
the total2.

Once in a while I need to run threw all the records update the fields with
current values, and after that I want to run an updatequery to update the
invoicetable to the correct paymentstatus.

Mattias
 
Back
Top