Python Global Variable Not Defined In Function Ms Access