That's what the code I put there does. Just add a few more cases, one for every menu option you need, and add a function that does that, and launch it there. I was unclear again, I'm afraid, so here's a part of a small, simplified database-management proggy.
Download Links:
Links are hidden from guests. Please register to be able to view these links. The individual functions you'll have to write yourself, though.