Dim strSQL As String
Dim varID
strSQL = "SELECT * FROM tbl_survey WHERE survey_year='2010'"
With CurrentDb.OpenRecordset(strSQL, dbOpenDynaset)
Do Until .EOF
varID = DLookup("ID","Query2","part_rate='52' and ID=" & !ID)
If Not IsNull(varID) Then
.Edit
!service = True
.Update
End If
.MoveNext
Loop
.Close
End With
|