A: If you have already filed the unlawful detainer papers at court and the tenant moves out before the trial, you have 2 choices: (1) dismiss the case or (2) ask the court to convert the case to a regular civil case for damages to collect back rent in the amount requested in the unlawful detainer complaint. If this is your situation, talk to a lawyer for help.
To request a dismissal of the case, file a Request for Dismissal (Form CIV-110).
If you do not dismiss the case or ask that it be changed to a regular civil case for damages, your tenant may go to the trial and ask the court to dismiss the case because he or she already moved out. If the tenant wins, he or she may get an award of costs for having to come to court for the trial when the case should have been converted to a regular civil case or dismissed.
http://www.courts.ca.gov/1291.htm