YOU'VE GOT A NICE LITTLE INC. 500 company with a unique product in a well-defined niche, and your sales have been spectacular. Mostly, you're just trying to figure out how to manage the growth, but you wonder when it will stop, when the niche market will be saturated, when some big competitor will move in, when the company will hit the wall. What to do?

Conventional wisdom offers a simple prescription: diversify. When you've filled your niche, move into a related one -- one that uses the same production processes, or the same distribution channel, or one that takes advantage of an existing customer base. Founds easy enough. But as many INC. 500 chief executives have discovered, second acts can be tricky business.

Consider Schmidt-Cannon Inc., in City of Industry, Calif. (#96). Schmidt-Cannon stages sales promotions and incentive programs for retailers. Back in 1983, with business booming, chairman and CEO Neil P. Cannon figured it was a good time to hedge his bets, and he started a division to help nonprofit organizations raise money by buying goods cheap and selling them at a tidy profit -- much the way the Girl Scouts do with cookies. With government support for nonprofits down and voluntarism the watchword of the day, Cannon was sure the idea couldn't miss.

It did. "I just didn't do a very good job," he says. "We were fine on the front end -- buying the merchandise and establishing the programs -- but we did a lousy job on the back end, following up on orders and going back to customers to create second and third programs."

The fund-raising division was soon scrapped, but not before it got Cannon to wondering if its failure didn't reveal a weakness about his core business. On a hunch, he went back to his customers to see how he could build on their existing relationship. After all, having proven once to department stores that a Schmidt-Cannon program could help build a base of credit customers with a premium incentive, it was easier to make the case that the company could help them in boosting daily traffic or monthly average purchases as well. Cannon took that message to his executives and sales force and "hammered it home," he says. Customers soon began to respond, and today 90% of Schmidt-Cannon's business comes from repeat customers, more than double that of 1983. Cannon credits the fund-raising debacle with helping focus the company and setting it on its present high-growth course.

This idea that failure can actually be a good thing is one we heard surprisingly often from this year's INC. 500 executives. In trying to understand why their attempts at diversification failed, company managers were forced to examine their businesses with a more critical eye, uncovering weaknesses, revealing hidden strengths, and often pointing to much better opportunities for growth. And as a result, these managers say, their companies became more focused, and more successful.

Joseph Maurelli, for example, became worried a couple of years ago when he realized that his Arlington, Va., company was becoming heavily dependent on government contracts, especially from the navy. Defense-minded Republicans weren't going to be in office forever, after all, so he began to consider strategies for attracting private-sector clients. If the government would pay Techmatics Inc. (#155) to provide consulting and systems-engineering services, he figured, surely other companies would pay to learn how to provide such services.

He started with soldering. The U.S. Navy has rather stringent standards on its soldering work, which meant that some companies couldn't get government contracts because their soldering was not up to par. Why not set up a school where wouldbe defense contractors could send their employees to be taught how to solder to navy standards?

It turned out to be a terrible idea. Techmatics didn't know the first thing about running a school, let alone marketing it. In the end, the company invested $10,000 to $20,000, at that time 1% to 2% of sales, and wound up without a single contract. But instead of being depressed about it, Maurelli relishes the memory. What the soldering-school failure taught him was that Techmatics had to refocus its efforts on his company's unusual engineering techniques and expand on them. And like Cannon, that led Maurelli back to his original customer base.

Now, when Maurelli completes one job successfully, he communicates with the client to see if there is some other engineering work that needs to be done -- even work that is not part of his company's repertoire. If there is, Maurelli will often ask the client for the chance to try his hand at the new task. Naturally, some customers say no, but a few say yes, and it has been from these opportunities that Techmatics employees have learned new skills that in turn have been used to expand the company's customer base. As a result, Techmatics continues to be a highly focused specialty engineering firm -- it just has more specialties to focus on.

Today, 15% of Maurelli's $6.5 million in sales comes from nondefense work, and the percentage is steadily increasing. Techmatics is now doing computer programming for the U.S. Post Office, and quality-assurance test support for RCA Corp., and design coordination for the U.S. Navy's guided-missile destroyer program. And as Maurelli sees it, his foray into the training business was something of a fortuitous failure that pointed the way to sustained growth -- which was, after all, the point of setting up the soldering school in the first place.

Unlike Techmatics or Schmidt-Cannon, some companies on this year's INC. 500 do find themselves today in altogether different businesses from those they started out in. And sometimes the diversification has not come by choice. Take the case of Thomas Scannapieco's Historical Developers of PA Inc. (#56).

Scannapieco had started the company in 1980 to take advantage of changes in the tax laws that gave enormous write-offs for the restoration of buildings with historical significance -- something there was no shortage of in and around Philadelphia. Historical Developers of PA would buy the properties, sell them to people looking for write-offs, and then restore them. "We were in the tax-shelter business," says Scannapieco, "and we lived and died on the tax code."

Death came in the guise of the 1986 Tax Reform Act. All of a sudden, tax shelters, which until then had been viewed a good way to further public policy by channeling money in desired directions, became not so good. And Thomas Scannapieco found himself without a business.

Or maybe not. For in thinking about his future, Scannapieco also discovered that the real asset his company had developed over six years of business was its knowledge of the Philadelphia real-estate market, which remains among the strongest in the country. Could that knowledge possibly be put to use? Apparently it has been. Historical Developers of PA is anticipating sales next year of $24.3 million from development and rehabilitation projects that offer no tax shelters, up 40% from 1986.

"We never really thought about diversifying, until it was forced upon us," says Scannapieco. "All the books I read said you should stick to your niche, and that doing so will protect you from competition."

Niches, however, by their very nature, are rather limiting, and at some point a growing company is often forced to give something else a try. Failure may be as likely as success. But if the INC. 500 companies are any indication, a momentary failure may be the necessary first step to a truly successful second act.