write a function to test for the existence of the data, and use that as a switch. the function (sql(strSQL)) is your friend in this.

/MM