I have the following code that is supposed to take a table and update the fields that are null with a value above it and change to the new value when the field isn't null and move to the next record:
However; I am getting an error message on line 10 "(If Len (rs.ID)<>0 Then" that states "Method or data member not found".
What am I doing wrong?
Thanks for your help.
Code:
Dim db As Database
Dim rs As Recordset
Dim strSQL As String
Set db = CurrentDb()
strSQL = "SELECT ID FROM tblInformation"
Set rs = db.OpenRecordset(strSQL)
rs.MoveFirst
Do Until rs.EOF
If Len(rs.ID) <> 0 Then
strDocName = rs.ID
Else
rs.Edit
rs.DocName = strDocName
rs.Update
End If
rs.MoveNext
Loop
rs.Close
However; I am getting an error message on line 10 "(If Len (rs.ID)<>0 Then" that states "Method or data member not found".
What am I doing wrong?
Thanks for your help.