Shortly after takeoff, the front cockpit canopy became detached during the climb. The pilot, distracted by a talkative passenger, had failed to properly close the cockpit side door before takeoff.