How to update specific records while leaving others intact

I have a results page that contain the information of several customers (name, address, phone, email, etc.). How would I go about updating only a select few records while leaving the other records intact?

What would the UPDATE statement look like to update the specific records only? I would like to add information to a field titled "Additional".

Below is my query.  Any asssitance with the Update statement is greatly appreciated.
<%
Dim Recordset1
Dim Recordset1_numRows
Set Recordset1 = Server.CreateObject("ADODB.Recordset")
Recordset1.ActiveConnection = "Driver={Microsoft Access Driver (*.mdb)};DBQ=c:\inetpub\wwwroot\statusreports\db\statusreports.mdb"
Recordset1.Source = "SELECT * FROM TPACM WHERE ReportDate = #"&Request.Form("ReportDate")&"# ORDER BY Boss ASC, Employee ASC"
Recordset1.CursorType = 0
Recordset1.CursorLocation = 2
Recordset1.LockType = 1
Recordset1.Open()
Recordset1_numRows = 0
%>
<%
Dim Repeat1__numRows
Dim Repeat1__index
Repeat1__numRows = -1
Repeat1__index = 0
Recordset1_numRows = Recordset1_numRows + Repeat1__numRows
%>

Open in new window

arendt73Asked:
Who is Participating?
 
Simon BallCommented:
oopps.. pressed submit too early!
Do While Not Recordset1.EOF

      if Recordset1!Name = "Sudonim" then
            Recordset1!Additional = "newval"
            Recordset1.update
      end if

      Recordset1.MoveNext
Loop

Open in new window

0
 
Simon BallCommented:
i am not sure if its different in adodb to dao

but you'd step through the record set and do an if on some fields to check you want to update that row, and if so perform the change to the relevant field

e.g.

Do While Not Recordset1.EOF

if Recordset1!Name = "Sudonim" then
Recordset1!Additional = "newval"
Recordset1.update
end if

        rs.MoveNext
    Loop
0
 
Simon BallCommented:
Did the above help?
0
 
arendt73Author Commented:
Only gave part of the solution.
0
 
Simon BallCommented:
which part was missing?

happy to help further.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.