When Azmina Kanji was asked to computerize the real estate development firm where she worked, she spent three weeks teaching herself how to use the software program.

"It cost my company about $5,000 worth of my time and it seemed silly," said Kanji, who vowed to someday buy her own computer software training business.

Although she and her husband, a pharmacist, had founded three day-care centers and purchased a pharmacy, buying a computer business was another story.

A business broker eventually introduced Kanji to Contracted Computer Training in Marina del Rey, Calif. While the training business was thriving and serving many major firms, the owner was burnt out and ready to sell.

With help from an experienced accountant, Kanji spent seven months examining every aspect of the company.

Finally satisfied the business had ongoing contracts with stable companies, potential for growth and an enthusiastic staff, Kanji made an all-cash offer for about $250,000.

For many entrepreneurs, buying an existing small business is more attractive than starting one from scratch. But shopping for a business takes a certain amount of know-how.

The biggest mistake a prospective buyer can make is to fall in love with the business before carefully checking it out.

"Most people look at the numbers too quickly, fall in love and get burned," said Joseph Krallinger, author of "How to Acquire the Perfect Business for Your Company," published by John Wiley & Sons.

"In real estate, it's location, location, location. In business, it's market share, market share, market share," said Krallinger, a certified public accountant based in Palm Desert, Calif., who once helped a conglomerate acquire 27 firms.

Once you find the kind of business you would like to run, Krallinger advises prospective buyers to take a very close look at the products or services produced by the business.

Ask yourself these questions:

Does the quality match what you and your customers want?

How many years has it been since the company introduced a new product or service?

Does the company have any patented technology or valuable trade secrets?

It is also important to determine why the owner wants to sell the business and keep digging for what Krallinger calls "the fatal flaw."

Plus it is essential to find out how the firm ranks against its competitors and whether it has growth potential in the current economy.

Don't try to save money by doing all this research yourself. Bring in an experiencedaccountant to review three to five years worth of financial statements.

If you are looking at buying a corporation, rather than just its assets or name, an accountant can help you uncover hidden liabilities such as unpaid taxes, employment agreements or short-term leases.

"If the seller's business has multiple locations, make sure he is not consolidating sales to bolster sales from a weak location," said Mel Poteshman, managing partner of Levine, Cooper & Spiegel in West Los Angeles.

Your accountant also can help you check the inventory and review the existing financing or credit lines.

Poteshman also advises buyers to ask the seller for an indemnification agreement to protect them against future liabilities.

When you are ready to draft a sales agreement, be sure to consult with an experienced lawyer who can keep you out of trouble.

"It's a buyer's right to ask as many questions as possible," said Steve Lampert, a principal of Biz Brokers in Sherman Oaks, Calif. "Buying a business is an emotional thing -- the buyer is operating out of fear of the unknown."

Lampert, who helped Kanji negotiate the purchase of Contracted Computer Training, advises prospective buyers to spend a few days observing how the business operates if the seller will allow them to hang around.

Although it is proper to collect as much information as possible about a company from public or industry sources, Lampert advises against speaking directly with customers or vendors until the deal is completed.

Many sellers will also ask potential buyers to sign a letter of confidentiality, which should be treated very seriously.

If you breach the agreement and release information, you could be subject to legal action.

"When you are looking at buying a business today, ask how strongly that business will be affected by the recession," said Lampert, who is advising clients to avoid buying any business related to new construction or luxury items.

"Stick with the basics," he said.

Lampert currently is helping buyers in the market for messenger services, auto parts stores, medical laboratories, flower shops and health food stores.

Lampert and other business advisers say it is important to know exactly where the business fits in the industry and what kind of reputation it has with customers, vendors and suppliers.

It is also important to figure out whether the owner has such a hold on the business that it would be impossible for you to step in and take over successfully.

"I would recommend working in the industry for a while so there are no surprises," said Kanji, who helped her husband revitalize the ailing pharmacy they bought four years ago.

Kanji, who has nine full-time employees and about 15 contract trainers, was lucky enough to retain most of the original staff.

The transition wasn't easy, however. One key manager quit in a fit of emotion after the sale, but later asked Kanji for her job back.

Jane Applegate welcomes letters and story suggestions from readers. Write to her at the Los Angeles Times, Times Mirror Square, Los Angeles, Calif. 90053.