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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top