Update Table Issue - help please

Joined
Jun 12, 2005
Messages
3
Reaction score
0
Hi,

For some reason the criteria does not seem to be hit. When this updates it will update records which should not match the findfirst and findnext criteria. The fields in the criteria are text fields.

Thanks,


Dim db As DAO.Database
Dim rs As DAO.Recordset

Set db = CurrentDb()
Set rs = db.OpenRecordset("BudgetTracking", dbOpenDynaset)

rs.MoveFirst
rs.FindFirst "[REQNumber] = '" & Me!ReqNumberREQ.Value & "'"
rs.Edit
rs!PONumber = Me!PONumberREQ
rs.Update
Do While Not rs.EOF
rs.FindNext "[REQNumber] = '" & Me!ReqNumberREQ.Value & "'"
rs.Edit
rs!PONumber = Me!PONumberREQ
rs.Update
rs.MoveNext
Loop

rs.Close
db.Close
Set rs = Nothing
 
Back
Top