Problem with iFrames and resizing to fit

I have a page with two iframes one above the other. They are linked to other pages on my domain which display data from a mySQL database. Over time the number of data rows increases and the tables become longer in height automatically. I need to display the two tables on the same page in this way but do not wish to have a long white space below the top iframe when it only has a few records to display. Later on it may have a large number of records and I don't want to have to use scroll bars.

I am looking for a way to increase the height of the iframes as the rows of records increase in number.