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?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Simon BallChief information OfficerCommented:
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 BallChief information OfficerCommented:
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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Simon BallChief information OfficerCommented:
Did the above help?
0
arendt73Author Commented:
Only gave part of the solution.
0
Simon BallChief information OfficerCommented:
which part was missing?

happy to help further.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Query Syntax

From novice to tech pro — start learning today.