I am trying to update a recordset after I edit it and the only thing that changes is the first recordset. The one I edited stays the same. Nothing gets edited but the first recordset. This is the code I am using, if someone could help out that would be way cool. I set a public boolean variable called infochanged.
=====
Private Sub CmdSave_Click()
If Infochanged Then
MsgBox "true"
Dim rs As ADODB.Recordset
strcnn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\databases\ServersTest.mdb;Persist Security Info=False"
Set rs = New ADODB.Recordset
rs.CursorType = adOpenDynamic
rs.LockType = adLockPessimistic
rs.Open "Select * From equipment", strcnn, , , adCmdText
rs!EquipmentName = "'" & Text2.Text & "'"
rs!Location = "'" & Text3.Text & "'"
rs!Service = "'" & Text4.Text & "'"
rs.Update
Else
MsgBox "false"
End If
rs.Close
Set rs = Nothing
Set conn = Nothing
End Sub aspvbwannab
=====
Private Sub CmdSave_Click()
If Infochanged Then
MsgBox "true"
Dim rs As ADODB.Recordset
strcnn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\databases\ServersTest.mdb;Persist Security Info=False"
Set rs = New ADODB.Recordset
rs.CursorType = adOpenDynamic
rs.LockType = adLockPessimistic
rs.Open "Select * From equipment", strcnn, , , adCmdText
rs!EquipmentName = "'" & Text2.Text & "'"
rs!Location = "'" & Text3.Text & "'"
rs!Service = "'" & Text4.Text & "'"
rs.Update
Else
MsgBox "false"
End If
rs.Close
Set rs = Nothing
Set conn = Nothing
End Sub aspvbwannab