PURPOSE: In this study, we compared the rate of depression diagnoses in adults with and without diabetes mellitus, while carefully controlling for number of primary care visits. METHODS: We matched adults with incident diabetes (n = 2,932) or prevalent diabetes (n = 14,144) to nondiabetic control patients based on (1) age and sex, or (2) age, sex, and number of outpatient primary care visits. Logistic regression analysis was used to assess the association between various predictors and a diagnosis of depression in each diabetes cohort relative to matched nondiabetic control patients. RESULTS: With matching for age and sex alone, patients with prevalent diabetes having few primary care visits were significantly more likely to have a new depression diagnosis than matched control patients (odds ratio [OR] = 1.46, 95% confidence interval [CI], 1.19-1.80), but this relationship diminished when patients made more than 10 primary care visits (OR = 0.95, 95% CI, 0.77-1.17). With additional matching for number of primary care visits, patients with prevalent diabetes mellitus with few primary care visits were more likely to have a new diagnosis of depression than those in control group (OR = 1.32, 95% CI, 1.07-1.63), but this relationship diminished and reversed when patients made more than 4 primary care visits (OR = 0.99, 95% CI, 0.80-1.23). Similar results were observed in the subset of patients with incident diabetes and their matched control patients. CONCLUSIONS: Patients with diabetes have little or no increase in the risk of a new diagnosis of depression relative to nondiabetic patients when analyses carefully control for the number of outpatient visits. Studies showing such an association may have inadequately adjusted for comorbidity or for exposure to the medical care system.