How 2 compare 2 recordsets?

  • Thread starter Thread starter jmonty
  • Start date Start date
Thanks Jmonty,
But, how can I compare between Record set? Open 2 do while
loop?
I have code like this but MS Access run very long time...
Do while not rs1.eof
Rs1.Edit
If Rs1.Fields("postyr").Value = "1" Then
Rs1!postyr = "2000"
End If
for i =1 to rs2.recordcount
rs2.edit
if rs2![ID]=rs1![ID] then
rs2![post]=rs1![post]
endif
rs2.update
next i
rs1.update
rs1.MoveNext
Loop

Any advice?
Best regards.
TA
-----Original Message-----

If rs1![ID] = rs2![ID] then
rs1![post] =rs2![post]
end if

-----Original Message-----
Hi,
Could your guy help me do this. I have 2 record set RS1
and RS2.

If rs1.fields("ID").value = rs2.fields("ID").value then
rs1!post =rs2.fields("post").value
end if
How i do this?
.
.
 
Never mind,, it is run fast now.
TA
-----Original Message-----
Thanks Jmonty,
But, how can I compare between Record set? Open 2 do while
loop?
I have code like this but MS Access run very long time...
Do while not rs1.eof
Rs1.Edit
If Rs1.Fields("postyr").Value = "1" Then
Rs1!postyr = "2000"
End If
for i =1 to rs2.recordcount
rs2.edit
if rs2![ID]=rs1![ID] then
rs2![post]=rs1![post]
endif
rs2.update
next i
rs1.update
rs1.MoveNext
Loop

Any advice?
Best regards.
TA
-----Original Message-----

If rs1![ID] = rs2![ID] then
rs1![post] =rs2![post]
end if

-----Original Message-----
Hi,
Could your guy help me do this. I have 2 record set RS1
and RS2.

If rs1.fields("ID").value = rs2.fields("ID").value then
rs1!post =rs2.fields("post").value
end if
How i do this?
.
.
.
 
Back
Top