Askeladden
Programmer
I'm trying to correct a misselling made in an access recordset by use of vb code.
Here is my code:
This is not working as I predicted.
Can someone tell me what I have done wrong, and how I might be able to fix it.
Thanks.
Here is my code:
Code:
Dim antallrecords As Integer
Dim t As Integer
frmRegistrering.datAccess.Refresh
frmRegistrering.datAccess.Recordset.MoveLast
antallrecords = frmRegistrering.datAccess.Recordset.RecordCount
frmRegistrering.datAccess.Recordset.MoveFirst
If antallrecords > 0 Then
For t = 1 To antallrecords
If frmRegistrering.datAccess.Recordset.Fields("Ansvarlig") = gstrNavnR Then
frmRegistrering.datAccess.Recordset.Fields("Ansvarlig") = gstrNavn
End If
Next t
End If
Can someone tell me what I have done wrong, and how I might be able to fix it.
Thanks.