Hi, I am trying to run the following code which updates a recordset, but Access just crashes with 'Not responding'
Any guidance is much appreciated, thank you
Code:
Sub updatechildren()
Dim dbsSchool As DAO.Database
Dim rstChidren As DAO.Recordset
Dim strSQL As String
Set dbsSchool = CurrentDb
strSQL = "select * from Children where Gender = 2 "
Set rstchildren = dbsSchool.OpenRecordset(strSQL, dbOpenDynaset)
If rstchildren.EOF Then Exit Sub
rstchildren.Edit
rstchildren![Hobbies] = "Football"
Do Until rstchildren.EOF
Loop
End Sub