Im looking for the title of a movie I believe from 80s but could be early 90s

It is about a peasant living in this town with his wife who finds a secret door

When he enters the door his life gets better, he keeps going through doors until his becomes a super wealthy king, but he's greedy and goes through door one more time and he is poor again

It is similar to fisherman and his wife grimm fairy tale

Please help