Oh I'm so sorry. What you are talking about is called luxating patellas.
I also visit another site and found this info which is soooo common in Yorkies. Did the vet say what grade it is? They grade it from 1 to 4, 4 being the worse.
Here is some info.
What is a luxating patella?
The patella, or knee cap, should be located in the center of the knee joint. The term "luxating" means out of place or dislocated. Therefore, a luxating patella is a knee cap that moves out of its normal location.
What causes this to occur?
The muscles of the thigh attach directly or indirectly to the top of the knee cap. There is a ligament, called the patellar ligament, which runs from the bottom of the knee cap to a point on the tibia (shin bone) just below the knee joint. When the thigh muscles contract, the force is transmitted through the patella and through the patellar ligament and results in extension (straightening) of the knee joint. The patella stays in the center of the leg because the point of attachment of the patellar ligament is on the midline and because the patella slides in a groove on the lower end of the femur (the thigh bone).
The patella luxates because the point of attachment of the patellar ligament is not on the midline of the tibia. It is almost always located too far medial (toward the middle of the body). As the thigh muscles contract, the force is pulled against the groove on the inner side of the femur. After several months or years of this abnormal movement, the inner side of the groove wears down and the patella is free to move out of the groove or dislocate. When this occurs, the dog has difficulty bearing weight on the leg. It may learn how to kick the leg and snap the patella back into its normal location. However, because the side of the groove is gone, it dislocates again easily.