I am concerned this could be a spinal injury. This could be from trauma, or intevertebral disc disease. Intevertebral disc disease commonly affects middle aged dogs, and particularly certain breeds like dachshunds, Pekinese and Beagles. Degeneration of the intevertebral discs can result in either slow or sudden compression of the spinal cord. Often neck pain is the only sign but other signs to watch for a incoordination and paralysis. This is a serious and very painful condition, and you dog should be examined by a veterinarian as soon as possible. It is important that any movement in the neck be minimised. Lift you dog in and out of the car and don't allow your dog to go up or down stairs.