(CNN) President Donald Trump has steadfastly refused to release his tax returns. But if Democrats take the majority in the House or Senate following the mid-term elections in November, the choice may no longer be his to make.

Why?

Because Democrats -- who have actively pushed for the public's right to see the president's returns -- would be in charge of one or both of the tax-writing committees in the chambers.

And thanks to a 1924 provision in the Internal Revenue Code, the chairmen of the House Ways and Means Committee and Senate Finance Committee are authorized to request the president's -- or indeed anyone's -- tax returns from the IRS to conduct an investigation.

How the provision works and why it was created

The chairmen of the tax-writing committees -- whether they act together or alone -- don't need to disclose that they've requested the president's returns. But they may choose to -- and likely would -- share the returns with their committee members in closed session.

If the committee thinks releasing the returns to the House or Senate would further a legitimate committee purpose, they're permitted to do so, according to George Yin, a former chief of staff at the Joint Committee on Taxation and a professor of law at the University of Virginia.

At that point it's up to the full chamber to decide whether to make the returns public. "Of course, as a practical matter, it's a little hard to imagine information going to the full House or Senate and not becoming public," Yin said.

The power to obtain and disclose anyone's tax return is an enormous one -- and it's been used very sparingly since it was first added to the tax code.

It was originally added to rectify a power imbalance between the executive and legislative branches, Yin wrote in earlier analyses of the provision. Back then, if Congress -- which is charged with oversight of the executive branch as well as all tax matters -- wanted to see a tax return it had to make the request through the president.

"It's very hard for Congress to vigorously investigate tax issues in the executive branch if the executive branch is the only one authorized to disclose the tax returns," said tax historian Joseph Thorndike.

At the time, lawmakers were looking into several matters involving possible transgressions in the executive branch, during Warren G. Harding's Administration, according to Yin. They were seeking to investigate the returns of those involved in the Teapot Dome Scandal, which concerned alleged bribery of government officials by private interests to gain leases to public oil fields.

They also were looking into potential conflicts of interest involving Treasury Secretary Andrew Mellon, who kept his hand in business while in office. Some also wanted to learn how Mellon might be affected by the tax legislation Treasury was proposing. And lawmakers wanted to assess whether Mellon was given favorable treatment by the Bureau of Internal Revenue, the equivalent of today's IRS.

Having the power to make a tax return public is especially important when it comes to potential transgressions by public officials, Thorndike said. "Congress can't do its oversight job if that oversight is hidden to the public. That's the heart of the oversight function."

If the Dems take over will they act?

Given the alleged conflicts of interests involving Trump's businesses and his role in public office as well as heightened concerns about his relationship with Russian President Vladimir Putin, the list of justifications for digging into his finances is long -- at least from the Democrats' perspective.

Rep. Bill Pascrell of New Jersey has led the Democrats' charge in the House to convince Republicans on the Ways and Means Committee to request Trump's returns. By Pascrell's count, however, Republicans have so far voted against the idea 17 times.

Should Democrats take the House in November, he said, "a first order of business for a new Ways and Means Committee next year will be demanding the Trump tax returns. Sunlight is always the best disinfectant."

Separately, Rep. Steny Hoyer, the House Democratic Whip, told reporters he believes the committees will want to see Trump's tax returns.

But Pascrell and Hoyer won't be the final word on the matter. The most likely candidate to run the Ways and Means Committee is current ranking member Rep. Richard Neal of Massachusetts. Neal has publicly expressed support for Pascrell's and others' push to get Trump's returns. But when asked if obtaining Trump's tax returns would be a priority should he be named chairman, his office did not immediately respond.

In July, however, Neal told The Hill , "there will be plenty of time in the future to determine if this course of action is necessary. But Democrats want to ensure that committee time and resources are always being used for the people, to better the lives of the American family."

Oregon's Ron Wyden, the top Democrat on the Senate Finance Committee, is most likely to assume the chairmanship if his party becomes the Senate majority.

Wyden wouldn't speculate on that hypothetical scenario. But in a statement to CNN, he said, "Democrats will restore Congress' Constitutional responsibility to conduct oversight -- a responsibility that Republicans have woefully neglected. Congress has a duty to investigate possible criminal cover-ups. We will ensure all of our elected officials, including the president, are following the law."