Thanks for posting the solution Rando (and just letting us know you had one. That's always helpful).
I should add that proper indenting of code is not only important for usability in a forum, but also for your own benefit. Frankly, wrongly done indenting is worse than none at all when trying to understand code. In this case the missing End With would have been immediately obvious.
All code within blocks (anything with a start and end marker like If ... Else; If ... End If; Do ... Loop; etc) should be indented from the surrounding code. This helps a reader to see easily which code is effected by the grouping.
As an illustration, your code would be :
- Do Until rs.EOF
-
strVersion = rs("Source")
-
With dbs
-
strSQL = "SELECT Top 1 * into " & strVersion & " from " & strWhatTable & " Where Source = '" & strVersion & "'"
-
.Execute strSQL
-
rs.MoveNext
-
Loop
I used a simple two-space indentation to fit more easily on the forum. In your own modules I'd use the normal four.