Acceso al bucle VBA (sin respuesta)
Estoy recorriendo un conjunto de registros para llevar a cabo algunas funciones básicas o ediciones.
Por lo general, con conjuntos de registros con más de 50 registros, el acceso dejará de responder.
yo tengome.repaint
antes del comando de bucle, pero la ventana siempre se congela y la barra de título de acceso muestra: ... (No responde).
¿Alguna idea de como solucionar esto?
Gracias.
Dave
EDITAR: Código de bucle agregado
If Me.Dirty = True Then Me.Dirty = False
Dim rs As DAO.Recordset
Set rs = Me.Guardians_Subform1.Form.Recordset
Dim strFirstName, strLastName As String
If Not (rs.EOF And rs.BOF) Then
rs.MoveFirst
Do Until rs.EOF = True
rs.Edit
strFirstName = Trim(StrConv(rs!FirstName, 3))
strLastName = Trim(StrConv(rs!LastName, 3))
If rs!FirstName <> strFirstName Then
rs!FirstName = strFirstName
End If
If rs!LastName <> strLastName Then
rs!LastName = strLastName
End If
rs.Update
rs.MoveNext
Me.Repaint
Loop
Else
MsgBox "There are no records in the recordset."
End If
Set rs = Nothing