Hi,
Trying to update one field in all records in a table using code attached to a button. Real basic stuff. The code isn't working. The code runs, but I'm adding a new record instead of updating the existing records
It's been several years since I did any of this. How do I update ALL the records instead of adding one new one?
Here's the code.
Thanks for looking and any advice!Code:Dim v_team_selected As String v_team_selected = Combo26 MsgBox (v_team_selected) Dim db As Database Set db = CurrentDb Dim rs As Recordset Set rs = db.OpenRecordset("Game_Records") rs.AddNew rs!team_selected = v_team_selected MsgBox ("Inside the AddNew. Variable = " + v_team_selected "Next step is update.") rs.Update MsgBox ("Update step just finished") rs.Close MsgBox ("rs closed") Set rs = Nothing MsgBox ("finish!")