You need to open the recordset with a dynamic cursor if you want to write back to the DB. In both these cases you are using a Static cursor.

If you change adOpenStatic to adOpenDynamic in the second procedure, you should be able to write to the table. You also don't need the IF statement.
VB Code:
  1. Private Sub test()
  2.  
  3.  
  4.     Dim rst As ADODB.Recordset
  5.  
  6.     Set rst = New ADODB.Recordset
  7.    
  8.  
  9.     rst.Open "Table1", CurrentProject.Connection, adOpenDynamic, adLockOptimistic
  10.    
  11.     rst.AddNew
  12.     rst.Fields("test") = "txt1"
  13.     rst.Update
  14.  
  15.     rst.Close
  16.     Set rst = Nothing
  17.    
  18. End Sub