Consulting

Results 1 to 2 of 2

Thread: Appending Array Tables in Access with VBA

  1. #1
    VBAX Newbie
    Joined
    Mar 2014
    Posts
    2
    Location

    Appending Array Tables in Access with VBA

    I have to append 120 tables into master table
    I get runtime error. Please Help

    Private Sub Append_Click()
    Dim aryTables As Variant
    aryTables = Array("project brd", "project udr")
    For K = LBound(aryTables) To UBound(aryTables)
    db.Execute "INSERT INTO master " _
    & "SELECT ID, Region, Country, ProjectName, " _
    & "ProjectNumber, Coordinates, BusinessDeveloper " _
    & "FROM [" & aryTables(K) & "]", dbFailOnError
    MsgBox db.RecordsAffected & " from table " & aryTables(K) & " were added to the master table."
    Next K
    End Sub

    Run-Time error '424'
    Object Required
    Last edited by ekryez; 03-25-2014 at 04:55 PM. Reason: tags

  2. #2
    VBAX Expert
    Joined
    Oct 2012
    Posts
    726
    Location
    What's db set to?

Posting Permissions

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