Is it possible to requery a single record? I have a datasheet on which I have records that can be clicked and when clicked i want them to change. The change part is easy but I dont want to requery the entire form because it will reset my view not to mention being unnecessary. I can do it with this code but it only requerys it once and then i have to deselect the record and click it again in order requery it again.
(this is an adaption of someone elses code)
Dim db As Object
Dim rst As Object
Dim fldEnumerator As Object
Dim fldColumns As Object
Set db = CurrentDb()
Set rst = db.OpenRecordset("Log")
Set fldColumns = rst.Fields
While Not rst.EOF
For Each fldEnumerator In rst.Fields
If fldEnumerator.Name = "ID" Then
If fldEnumerator.Value = Forms!Log!ID Then
rst.Requery
End If
End If
Next
rst.MoveNext
Wend
Surely there is some way to get this to work correctly...
(this is an adaption of someone elses code)
Dim db As Object
Dim rst As Object
Dim fldEnumerator As Object
Dim fldColumns As Object
Set db = CurrentDb()
Set rst = db.OpenRecordset("Log")
Set fldColumns = rst.Fields
While Not rst.EOF
For Each fldEnumerator In rst.Fields
If fldEnumerator.Name = "ID" Then
If fldEnumerator.Value = Forms!Log!ID Then
rst.Requery
End If
End If
Next
rst.MoveNext
Wend
Surely there is some way to get this to work correctly...