Hi,
I am a bit newbie,
could anyone please tell me how I can run the following code in Access?
Dim rs As DAO.Recordset
Dim strLastChar As String
strLastChar = ""
Set rs = "Select * from table1 Order By Nr"
WHile Not rs.EOF And Not rs.BOF
rs.Edit
If rs!Field1 = "" Then
rs!Field2 = strLastChar
ElseIF rs!Field1 = strLastChar Then
rs!Field2 = "Undefined."
Else
rs!Field2 = rs!Field1 & " " rs!Field1
End If
rs.Update
rs.MoveNext
wend
Many thanks in advance!!!
I am a bit newbie,
Dim rs As DAO.Recordset
Dim strLastChar As String
strLastChar = ""
Set rs = "Select * from table1 Order By Nr"
WHile Not rs.EOF And Not rs.BOF
rs.Edit
If rs!Field1 = "" Then
rs!Field2 = strLastChar
ElseIF rs!Field1 = strLastChar Then
rs!Field2 = "Undefined."
Else
rs!Field2 = rs!Field1 & " " rs!Field1
End If
rs.Update
rs.MoveNext
wend
Many thanks in advance!!!