title: How can I insert data into Access database fields?
body: <p>I have created multiple forms and each contains multiple buttons. The end-user will go through the forms sequentially where he selects one button and goes to the next form and so on.</p>
  
  <p>I also created a table that stores the entered data. For example; if the user clicks Button A, the designated field will have value of "A" and so on. In other words, each button will enter a certain data into a specific field.</p>
  
  <p>What I wanted eventually is to have a complete record set (row) after the set of forms finishes.</p>
  
  <p>I used the following code inside the very first button in the first form</p>
  
  <pre><code>Dim RS As DAO.Recordset
  Set RS = CurrentDb.OpenRecordset("Data", dbOpenDynaset)
  RS.AddNew
  RS("WLAN") = "ARUBA"
  RS.Update
  Set RS = Nothing
  </code></pre>
  
  <p>In the later forms (buttons), I used the following code</p>
  
  <pre><code>Dim RS As DAO.Recordset
  Set RS = CurrentDb.OpenRecordset("Data", dbOpenDynaset)
  RS.Edit
  RS("Security") = "WPA2-PSK"
  RS.Update
  Set RS = Nothing
  </code></pre>
  
  <p>Now what happens is that the first sequence of forms (buttons) successfully enter data into the first row in my table [Data] but when I start over and select other buttons, the existing row get edited with the new selections.</p>
  
  <p>What I want is to add a new record and insert data into it and not to edit the previous one.</p>
  
  <p>I will highly appreciate your kind help and i'm sorry for the long post.</p>
  
  <p>Thank you,
  Nasser  </p>