Results 1 to 3 of 3

Thread: Interesting question!!!!

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Oct 2000
    Location
    Chicago
    Posts
    97
    Hi,
    Here is an interesting question.Can anyone tell me the solution to this..
    if i have table1 with 5 rows, and table2 with 10 rows (similar table structure), thru coding how do i append all 10 rows to table1 ....

    Interesting isn't it.Any help will be highly appreciated.

    Regards
    Anil

  2. #2
    Guest
    maybe more detailed information will help to get usefull answers. are you using a database (if so, which one) ...

    best regards

    Sascha

  3. #3
    New Member
    Join Date
    Jul 2000
    Location
    Logan, Utah
    Posts
    15
    I never tested it out but this might be an idea. Maybe there is a better way.

    Usage: AppendTable Table1, Table2

    This should append Table1 onto Table2. If I did the code right, anyway.

    Public Sub AppendTable(rs1 As ADODB.Recordset, rs2 As ADODB.Recordset)

    Dim rc As Integer, i As Integer, j As Integer

    rs1.MoveLast
    rs1.MoveFirst
    rc = rs1.RecordCount

    For i = 1 To rc
    rs2.AddNew
    For j = 0 To rs2.Fields.Count - 1
    rs2.Fields(j).Value = rs1.Fields(j).Value
    Next j
    rs2.MoveNext
    Next i
    End Sub

    If this isn't what you are talking about let me know.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width