The Buddy System(1984)
A quiet school truant officer, Joe, uncovers a young boy's attempt to fake a residential address, and subsequently gets involved romantically with the boy's mother. The truant officer waffles between a sadistic relationship with his on-again, off-again girlfriend and the mother. When one of the officer's inventions takes off, he chooses the girl and shatters the friendship with the boy and his mother. Only at the last possible moment does he figure out what he's sacrificed, and attempts to get it back.