Headlights work,dash and running lights don't

The dash and running lights on my '97 Ford E-150 don’t come on with my headlights.If I pull out the switch all the way to the headlight position and then slowly push it in until I find a sweet spot before the head lights shut off, I get all lights on.If I hit a bump, the headlights go out.I replaced the switch with a new one but the problem persists.Any ideas?

You may have a poor ground connection.