Headlight help

The low beams work, my dash lights work, my tail lights & turn signals all work. The only problem is my headlights go out completely when I hit the dimmer switch. Ammeter is showing normal charge.