hexleena
03-24-2009, 12:39 PM
This is the macro that I am running but it takes a long time to execute.....not sure if it is still running or gone into a hang. Please help!
The table has 9,00,000 rows.
Public Sub LoginAppend()
Dim ds As Database
Dim rs As Recordset
Dim i As Integer
Dim strLogin As String
On Error Resume Next
Set ds = CurrentDb
Set rs = ds.OpenRecordset("select * from Service_t")
Do Until rs.EOF
strLogin = ""
For i = 1 To Len(rs!login)
If Mid(rs!login, i, 1) = "#" Then
Exit For
End If
strLogin = strLogin & Mid(rs!login, i, 1)
Next
rs.Edit
rs!loginRevised = strLogin
rs.Update
rs.MoveNext
Loop
End Sub
The table has 9,00,000 rows.
Public Sub LoginAppend()
Dim ds As Database
Dim rs As Recordset
Dim i As Integer
Dim strLogin As String
On Error Resume Next
Set ds = CurrentDb
Set rs = ds.OpenRecordset("select * from Service_t")
Do Until rs.EOF
strLogin = ""
For i = 1 To Len(rs!login)
If Mid(rs!login, i, 1) = "#" Then
Exit For
End If
strLogin = strLogin & Mid(rs!login, i, 1)
Next
rs.Edit
rs!loginRevised = strLogin
rs.Update
rs.MoveNext
Loop
End Sub