Many Northwest parents have campaigned to ban sugary sodas, candy bars, and similarly worthless foods from school vending machines, based on the reasonable assumption that this would encourage healthier eating habits. But a new study published last week comes to a surprising conclusion: at least in middle schools, the researchers found no link between increased access to junk food at school and higher obesity rates.

The study, published this month in Sociology of Education, tracked nearly 20,000 students and found that while the percentage of kids who had ready access to high-calorie snack foods in school vending machines increased between fifth and eighth grades, the percentage of obese students declined slightly, from 39 percent to 35 percent. (Still, it seems wrong to look for the silver lining in numbers that suggest more than a third of eighth graders are still obese.)

Why? Here’s what lead Pennsylvania State University researcher Jennifer Van Hook had to say:

We expected to find a definitive connection between the sale of junk food in middle schools and weight gain among children between fifth and eighth grades. But, our study suggests that—when it comes to weight issues—we need to be looking far beyond schools and, more specifically, junk food sales in schools, to make a difference.

Schools only represent a small portion of children’s food environment. They can get food at home, they can get food in their neighborhoods, and they can go across the street from the school to buy food. Additionally, kids are actually very busy at school. When they’re not in class, they have to get from one class to another and they have certain fixed times when they can eat. So, there really isn’t a lot of opportunity for children to eat while they’re in school, or at least eat endlessly, compared to when they’re at home. As a result, whether or not junk food is available to them at school may not have much bearing on how much junk food they eat.

Explain that to the Seattle School Board, which is considering relaxing the ban on unhealthy food in high school vending machines that’s been in place since 2004. After area high schools replaced junk food with milk, natural fruit juice, granola bars and baked chips, student association profits from vending sales dropped from $214,000 to $17,000. (That money goes to defray the costs of sports uniforms, support clubs, pay for dances, and publish yearbooks, and students have rightfully complained that the school board hasn’t followed through on its promises to replace that lost revenue.)

Based on those numbers, it seems clear that less junk food is being eaten in school hallways. That jibes with previous studies that have found that the more vending machines found in a school, the higher the number of student snack food purchases.

But clearly, kids don’t just eat at school. One of the arguments for relaxing the junk food vending ban is that kids on open campuses can generally walk down the street to a gas station or minimart and help themselves to all the Doritos, Skittles and Red Bull that they want. In the state of Oregon, which instituted a similar ban on the sale of high-calorie vending snacks in 2007, teachers have also complained that removing junk food from their lounges apparently violates their civil rights to eat cookies.

Some will use this latest study to argue that putting junk food back in school vending machines is a fine idea. Others will claim that it offers a misguided excuse to set a terrible example of what food kids should be putting into their bodies. But that’s not what the study’s authors are really saying: the more poignant part of their message is that if we want to make a dent in what kids eat, we need to reach them long before they can even read The Cat in the Hat, much less a nutrition label. As the study authors argue:

There has been a lot of research showing that many children develop eating habits and tastes for certain types of foods when they are of preschool age, and that those habits and tastes may stay with them for their whole lives. So, their middle school environments might not matter a lot.

Sure, it’s kind of a depressing conclusion. But lots of people with kids will recognize there’s truth to it. It doesn’t mean that we should let 12-year-olds buy all the Ho Hos they want at school. It just means that addressing childhood obesity will be a lot more complicated than banning them and calling it a day.