Following on from my attempt to use code to filter data direct from a database (http://www.infopathdev.com/forums/t/17761.aspx), I've had to abandon that attempt (since browser-enabled forms can't submit to databases), so I'm using Sharepoint external lists now.
Again, I've got the same goal of populating company detail ...