Hello,
I got a textbox in a form which does calculate for me. Calculation works fine but now I need to write it away in a table. I use access 2010 and I am aware that the function calculation exist. But my calculation uses multiple tables so that is not going to work I suppose.
The textbox with value is named = 'totaal_prijs' and it needs to be written away in the table 'Bestelling' and in field 'totaal_prijs'.
This didn't seem to work:
Code:
CurrentDb.Execute "UPDATE Bestelling SET (totaal_prijs) Values ('"& Me.totaal_prijs &"')"
or
Code:
Me!totaal_prijs = Me!Bestelling.Column(4)
All are applied at the after update from the Form.
Edit:
This code works 1/2 but it updates ALL records. How can I make it update only the record from the form which is opened. And that I don't need to use an button?
Code:
docmd.setwarnings false
docmd.runsql "UPDATE Bestelling SET Bestelling.totaal_prijs = " & Forms!Bestelling!totaal_prijs
docmd.setwarnings true