It's probably a bad connection that needs cleaning up, or possibly a faulty dip switch. Switch the lights on and use a test lamp or voltmeter to trace the wiring from the dip switch.
Alex Holden - http://www.alexholden.net/
If it doesn't work, you're not hitting it with a big enough hammer.
99% chance of bad connection as alex says,if you havent got a test lamp or voltmeter go to the drivers side front under the bonnet and you will see where the wiring loom is connected to the lights,put the headlights on full beam and find the connector to the headlights, back trace them from where they come through the inner wing,Pull one off and if the main beam goes out,then reconnect and clean up the other one(Dipped connector)Obviously the reverse if the main beam stays on.This is the main point for most heaqdlamp faults.It shouldn't be a bad earth as that would effect the mainbeam as well.Good luck with it
Actually - filaments rarely break when 'lit' - the wire is then nice and stretchy. They break when NOT lit. This is used as evidence after accidents to determine if lights were ON at the time of the accident.