If you are looking for a code solution (C# or Visual Basic) on copying data from a secondary data source (a SharePoint list in this case) to a repeating node (for example that of a repeating table) in the Main data source of an InfoPath form, I’ve just published the following article: Programmatically copy rows from a SharePoint list to a repeating node in the Main data source in InfoPath
Enjoy!
Update Jul 4, 2009:
While you can use code that loops through a repeating table – as discussed in the article referenced above – you can also use an XSL transformation to copy the data from one repeating table to the next in one step.
I show you how to do this in the following article: Copy a SharePoint list to an InfoPath repeating table using XSLT.
If you’re just starting out working with repeating table, I highly recommend that you try to get up to speed with the basics of repeating tables first, before attempting to write code to manipulate their data.

Comments to this post were closed 30 days after it was published.