On the morning of the cross-country flight, during the preflight inspection of the airplane, the pilot and pilot-rated passenger confirmed that the total amount of fuel onboard was sufficient for the planned flight of that was to be about 2 hours in length. After departure, they flew with the fuel selector in the right tank position for 1 hour 25 minutes. When they were about 40 minutes from the airport where they intended to refuel, the pilot switched the fuel selector to the left tank position.During the final approach to the runway, when the airplane was at an altitude about 700 ft mean sea level, the pilot switched the fuel selector back to the right tank; the landing checklist required the selector to be selected to the fullest tank for approach and landing. The pilot-rated passenger noticed that the left fuel tank gauge indicated 1/4 full, and the right fuel tank gauge indicated 1/2 full. He then advised the private pilot that could not be correct, as they had been operating on the right tank for most of the flight. The nose of the airplane then dropped, and the pilot-rated passenger advised the pilot that the airplane had lost engine power. The pilot-rated passenger then noticed the pilot twisting the vernier-type throttle, and he told him again that the engine was not producing any power. The pilot then reached down and switched the fuel selector to the left tank. As the pilot leaned forward, his torso pushed against the control wheel assembly and the airplane pitched sharply downward. The airplane impacted trees about 2,000 ft from the threshold of the runway.Examination of the accident site revealed evidence of cut tree limbs; an indication of the engine regaining power moments before impact, and/or the propeller rotating at high rpm at the moment of impact. Examination of the wreckage revealed no evidence of any preimpact failure or malfunction of the engine and review of data from an installed engine data monitoring system indicated that the engine was functioning normally until it lost power when the pilot selected the right wing tank in preparation for landing.About 16 gallons of fuel was drained from the left tank, and about 0.5 gallon was drained from the right tank. Postaccident functional testing of the fuel quantity indicating system showed that when the right fuel tank quantity transmitters were actuated to full, the right fuel tank quantity gauge responded Page 2 of 9 ERA18FA012accordingly. When the right fuel tank quantity transmitters were actuated to empty, the right fuel tank quantity gauge still indicated approximately 3/4 full, indicating that the right fuel quantity transmitters were malfunctioning.Review of airplane maintenance records revealed that in the years since its manufacture, multiple repairs and replacements of fuel system components had occurred, including installation of a new fuel transmitter in the left wing. There was no record of the right-wing fuel transmitters having been replaced. According to the pilot-rated passenger the pilot specifically knew about the right fuel tank's fuel quantity indication problem. Thus, based on the fuel usage during the flight and the right tank's fuel quantity indication problem, the pilot should have recognized that the right tank contained less fuel than the left tank and should not have relied on the fuel gauge.