Sorry agraham,
today, I spend some time to reproduce the crash, but I can't.
Now, in debug run or the compiler always the same error message as you have seen is reported:
"An error ocurred on sub_main_defaults"
~" -1 is invalid for Value, ...should be between 'Min..' and 'Max..' ..."
It is unbelievable! A few days ago the crash repeated any time after I had restarted the B4P IDE. But I didn't restart Windows (and .NET).
I solved the problem by moving the 2 lines in a sub that is executed when the panel containing 'num22' becomes visible and table4 is surely loaded (.RowCount > 0).
Thank You
DieterR