I am writing code to get a subset of table records, but it is not
looping properly through the fields, it keeps getting stuck in some
sort of infinite loop and I have to be able to walk the whole
recordset.
Am I not using the do loop properly??
dim db as DAO.database
dim rs3 as DAO.recordset
dim strSQL as string
strSQL = "SELECT tblComments.AuditID, tblComments.txtTopic,
tblComments.memAuditTopicComments"
strSQL = strSQL & " FROM tblComments"
strSQL = strSQL & " WHERE tblComments.AuditID=" & lngAuditID
Set rs3 = db.OpenRecordset(strSQL)
rs3.MoveFirst
rs3.MoveLast
Do Until rs3.EOF
'this should show different values, but gets stuck on the value of the
last record
MsgBox rs3.Fields("txtTopic").Value
Loop
I actually need to run a Select Case statement inside the Do loop to
update various records in the recordset, it is a small recordset, <20
records.
Thank you, Tom