It was the pair's second attempt to persuade Stanislaus County Superior Court Judge Ricardo Córdova to let them use a medical necessity defense at their trial, set to begin in March.
Córdova said he was unconvinced that Tribuzio and Robinson didn't have any legal alternatives. They each are charged with possessing drug paraphernalia, a misdemeanor.
"(There) is a legislative solution to this issue," Córdova said, noting several bills that recently have come before state legislators.
Needle-exchange programs have long been controversial, pitting those who want to reduce a public health threat against those who fear encouraging drug use by supplying the tools.
Local critics, including Stanislaus County District Attorney Birgit Fladager and Sheriff Adam Christianson, said a needle-exchange program in Modesto would enable drug users to continue their addiction.
In September 2008, the Stanislaus County Board of Supervisors nixed a proposal to legalize a needle exchange despite recommendations from a civil grand jury and county health professionals.
The grand jury's report said the county was on pace to record 620 new hepatitis C cases in 2008, up from 519 in 2007.
Defense attorney Rubén Villalobos said the defendants were fighting a health threat: the spread of HIV and hepatitis C in Stanislaus County among drug users who share needles or use dirty ones.
In California, there are more than 40 needle-exchange programs, but the Central Valley has just three, according to the state Department of Public Health.
Bee staff writer Merrill Balassone can be reached at firstname.lastname@example.org or 578-2337