Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Copy and paste within a recordset - Probably very simple??

Status
Not open for further replies.

ooch1

MIS
Nov 4, 2003
190
GB
Hello,

Being a beginner im still struggling with some of the basics. All i want to do is using 'Select Case' copy a particular value within the recordset (rs.siterefnum) and then paste it when the an additional case is met.

This segement of code of is currently stands as:
Code:
Do While Not rs.EOF 'loop from 1st row last row
    CS = Nz(rs![NA_Ctrt_STATUS], ""): E = rs![Effective From Date]: M = rs![meterpointref]: S = Nz(rs![siterefnum], "") ' store rs refs
    E2 = Nz(rs2![Effective From Date]): M2 = rs2![meterpointref]: S2 = Nz(rs2![siterefnum], "")
    Select Case M
        Case Is = M2 And (rs2.AbsolutePosition <> rsEnd) And IsEmpty(E2)
        rs.Bookmark = Edt
        Case Is <> M2 And (rs2.AbsolutePosition <> rsEnd) And IsEmpty(E)
        E = Edt
    End Select
    rs.Update
    rs.MoveNext
    rs2.MoveNext
Loop

I had tried to use a bookmark, but then still don't know how to paste the relevant info.

I'm sure this is a very basic query, but i'm struggling to find a solution through the help menu's etc??

OOch
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top