Hi Charlie and welcome to our forum!
You'll have to write some code to do this. You can add a "sort" button and an OnClick handler. Then you'll have to write a little code to walk through the rows in your table and sort them. I'll ask one of our developers to post an example.
Patrick Halstead [InfoPath MVP]
InfoPathDev
Patrick Halstead
Project Manager at Qdabra