PC Review


Reply
Thread Tools Rate Thread

How 2 compare 2 recordsets?

 
 
jmonty
Guest
Posts: n/a
 
      22nd Sep 2003

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?
>.
>

 
Reply With Quote
 
 
 
 
ta
Guest
Posts: n/a
 
      22nd Sep 2003
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?
>>.
>>

>.
>

 
Reply With Quote
 
ta
Guest
Posts: n/a
 
      22nd Sep 2003
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?
>>>.
>>>

>>.
>>

>.
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Use Vb.Net to compare recordsets Gaby Sandoval Microsoft VB .NET 6 29th Jan 2010 07:07 PM
Compare recordsets =?Utf-8?B?UmF5IENhY2NpYXRvcmU=?= Microsoft Access VBA Modules 5 30th Sep 2006 03:39 PM
How do I compare cells and if FALSE compare to next cell in EXCEL =?Utf-8?B?Q2luZGll?= Microsoft Excel Worksheet Functions 0 24th Mar 2006 05:29 PM
How do you compare bookmarks in DAO recordsets? =?Utf-8?B?RGF2aWQgQW5kZXJzb24=?= Microsoft Access Form Coding 18 13th Jun 2005 01:37 AM
compare data from one column with another and compare result to yet another Matt Williamson Microsoft Excel Programming 1 25th Sep 2003 08:54 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:58 PM.