You've tossed a LOT of code out there, but you haven't given us any information about the kind of problem you're having, except "run time error". You don't give any indication of where that error might be occurring. You are expecting us to help you, but you won't give us any help. Please see the tips that I posted in your other thread
I could copy your code and paste it into my compiler and debug it for you and rewrite it correctly. You will learn more if you analyze your code carefully enough to EXPLAIN to us where we might concentrate our attention and avoid wasting our time on working areas.