Narrative:

My intention was to stop for refueling. On approach to [my fuel stop] I dialed in the frequency for [the wrong airport] instead; which lead to the confusion. [The wrong tower] cleared me to runway 23; when my intended place of landing is ZZZ. I realized something was not right when I was approaching the airport and runway 20 was in front of me. I departed the class D without incident; corrected the frequency and landed without incident.

Google
 

Original NASA ASRS Text

Title: PA-28 pilot put in the wrong Tower frequency and after receiving clearance to land on a runway which was not at the intended airport; realized the error; departed; entered the correct frequency and returned to land.

Narrative: My intention was to stop for refueling. On approach to [my fuel stop] I dialed in the frequency for [the wrong airport] instead; which lead to the confusion. [The wrong Tower] cleared me to Runway 23; when my intended place of landing is ZZZ. I realized something was not right when I was approaching the airport and Runway 20 was in front of me. I departed the Class D without incident; corrected the frequency and landed without incident.

Data retrieved from NASA's ASRS site as of July 2013 and automatically converted to unabbreviated mixed upper/lowercase text. This report is for informational purposes with no guarantee of accuracy. See NASA's ASRS site for official report.