Narrative:

Confusion regarding transponder squawk. While cruising on the 120 degree radial, approximately 12 NM from msn, I discovered the transponder was set to XXXX. I mistakenly thought I failed to change to 1200 at lnr before landing. I then set the transponder to 1200. This mistake was reinforced by the belief that msn approach did not give me a transponder squawk because of my altitude and their vectoring of me around the class C airspace. After approach asked if I changed my code, I said I had and explained why. The controller then approved communication frequency change. This event would not have occurred if I simply asked ATC if I was squawking the correct code and kept better records.

Google
 

Original NASA ASRS Text

Title: SMA ACFT PLT MISTAKENLY SELECTED WRONG XPONDER CODE. APCH CTLR QUERIED RPTR ABOUT THE CODE WHILE VECTORING HIM AROUND CLASS C AIRSPACE. CONFUSION ADMITTED.

Narrative: CONFUSION REGARDING XPONDER SQUAWK. WHILE CRUISING ON THE 120 DEG RADIAL, APPROX 12 NM FROM MSN, I DISCOVERED THE XPONDER WAS SET TO XXXX. I MISTAKENLY THOUGHT I FAILED TO CHANGE TO 1200 AT LNR BEFORE LNDG. I THEN SET THE XPONDER TO 1200. THIS MISTAKE WAS REINFORCED BY THE BELIEF THAT MSN APCH DID NOT GIVE ME A XPONDER SQUAWK BECAUSE OF MY ALT AND THEIR VECTORING OF ME AROUND THE CLASS C AIRSPACE. AFTER APCH ASKED IF I CHANGED MY CODE, I SAID I HAD AND EXPLAINED WHY. THE CTLR THEN APPROVED COM FREQ CHANGE. THIS EVENT WOULD NOT HAVE OCCURRED IF I SIMPLY ASKED ATC IF I WAS SQUAWKING THE CORRECT CODE AND KEPT BETTER RECORDS.

Data retrieved from NASA's ASRS site as of July 2007 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.