you have this in your menubar function
ClosDB();
should be
CloseDB();
and you have those functions both in getsection and getmenubar, do you think those open and closes could be conflicting, like it opens in getsection and then getmenubar closes it, but you still need it open in getsection, you see what i mean, the overlapping, not sure if it is, but it could be