Once, this place was a grim motel where Montgomery County provided emergency shelter to homeless families who had reached a dead end.

Now the Gaithersburg Econo Lodge has become Seneca Heights Apartments. It's all windows and fresh paint, and apartments for rent on a sliding scale to homeless individuals and families.

And it's a concrete reminder of how some communities' approaches to homelessness are evolving -- as limited funds are devoted to creating low-cost apartments rather than emergency shelters.

"It really is a shift, a different way of looking at homelessness," said Sharan London, executive director of the Montgomery County Coalition for the Homeless, which will operate the facility under contract to the county. "If we can create enough affordable housing, we really can end homelessness rather than manage it."

Among the working poor families at Seneca Heights, Annette and Douglas A. Anderson and their five children can leave behind their three-year odyssey of motels and friends' couches to rent one of the 17 low-cost transitional apartments while they clear the credit history they damaged after a job layoff and an eviction. The rent they pay will be returned when they are ready to move on to a place of their own.

And such residents as disabled former construction worker Allen Montgomery, who was greeting visitors yesterday, is able to leave the emergency shelter system for one of the 40 neat studio apartments. Some might stay the rest of their lives. Montgomery hopes to use this as a steppingstone to finding his own apartment.

Yesterday, new residents and a host of local, state and county officials gathered to celebrate the culmination of years of working to create Seneca Heights.

The effort took everything from a change in county zoning law to allow such "Single Room Occupancy" complexes to the winning over of the area's wary neighbors, to the patching together of $8.5 million in federal, state and county funding and a gift from a church.

"We've transformed a blighted hotel to a beautiful community," said Gaithersburg Assistant City Manager Fred Felton, on hand yesterday morning in the light rain for the ribbon cutting.

The idea of tackling homelessness with housing rather than shelters is gaining credence among advocates. As part of a larger national goal of ending chronic homelessness by 2012, the U.S. Department of Housing and Urban Development is offering grants to communities to help pay for Single Room Occupancy projects such as Seneca Heights. In Northeast Washington, an abandoned apartment building was transformed into Shalom House, a site that provides affordable long-term housing.

The approach also is being embraced by the state of Maryland and is taking shape in inner-city Baltimore and suburban areas, such as St. Mary's County, state housing director Victor Hoskins said.

"Seneca Heights is just the first of what we're committed to doing," Montgomery County Executive Douglas M. Duncan (D) said. "We're already working on a second site in downtown Bethesda."

The 40 single units at Seneca Heights provide lodging that in some ways is reminiscent of the single room occupancy hotels of the past. Those hotels, though often maligned as fleabags and flophouses, helped fill an affordable-housing need until they were displaced by gentrification and the wrecking ball.

In addition to a low-cost place to stay, these new SROs provide social services to help with such problems as addiction, mental illness and physical disabilities -- programs generally not available in the emergency shelter system.

The emergency system is also not a good place for families who might find themselves homeless because of a temporary setback.

A recent annual survey of homelessness in the region found that in most suburban jurisdictions, the majority of homeless people were living in families, and that many of the adults in these families were working. In Maryland, where the average rent for a modest two-bedroom apartment is nearly $1,000 a month, the family of a breadwinner such as Douglas Anderson, who makes $20 an hour installing security systems, can quickly become homeless.

When Anderson got laid off, his family fell behind on its rent in Mount Rainier. They were evicted and unable to qualify for another place, even when he found another job. They spent three years staying with friends and family or paying $400 a week to stay in motels.

"Why am I the face of homelessness?" Anderson asked. "I work. My wife takes care of our children. We're not the kind of people bucking the rules."

Douglas and Annette Anderson, who have five children, are grateful for the chance to move into Seneca Heights. For years, they stayed with family or friends or paid $400 a week to stay in motels.

A converted hotel, Seneca Heights includes permanent and temporary housing and a playground.