While high age, low level of education and APOE epsilon4 allele are known to predict dementia, there is recent data suggesting that certain viruses and subtypes of APOE epsilon3 could be involved, too. We investigated these relationships in a home-dwelling cohort of 357 elderly people with various cardiovascular diseases (DEBATE study). MMSE score below 24 was used to define cognitive impairment (n = 58). When adjusted for age and the presence of diabetes, multivariate analysis demonstrated maximally increased risk of cognitive impairment in association with a combination of three factors: seropositivity for herpesviridae, presence of APOE epsilon4, and low education (risk ratio 6.1, 95% CI 2.4-15.2). In the subcohort of APOE3/3 individuals (n = 216) homozygosity for the -219G epsilon3 haplotype showed a similar association (risk ratio 8.8, 95% CI 2.6-29.8). These results demonstrate an interaction of specific genetic (APOE) and environmental (education and herpesviridae) risk factors in the development of cognitive impairment and indicate that not only the epsilon4 allele of APOE but also the epsilon3 haplotype is a risk factor for dementia.