EMB ERJ 145 ER/LR
Flight Crew Instrument; Flight Crew Multiengine; Flight Crew Air Transport Pilot (ATP)
Aircraft Equipment Problem Critical
Flight Crew Overcame Equipment Problem
Aircraft
First Officer flying; received PTRIM MAIN INOP EICAS Warning as we leveled off.  He was hand flying at the time we got the message.  He said his trim was not working so I took over the aircraft and noticed my main trim was not working either.  We ran the QRH and I decided to continue as Pilot Flying for the rest of the flight.  We landed in ZZZ using the backup trim without issue.
EMB-145 Captain reported a pitch trim failure during flight.