Its not a headlamp switch problem. Headlamps are on there own and do not rely on the key being on. I would look at ground issues.