We aim to study the effects of the number of medications consumed over a five-year period after diagnosis on functional decline trajectories in older adults living with AD (Alzheimer's disease) and LBD (Lewy body dementia).This is a longitudinal analysis of a Norwegian cohort study entitled "The Dementia Study of Western Norway" (DemVest). We included 196 patients newly diagnosed with AD (n=111) and LBD (n=85), followed annually for 5 years. A linear mixed-effects model was conducted to analyze the effect of numer of medications on functional decline measured by the Rapid Disability Rating Scale - 2(RDRS).The mean of medications consumed at baseline was 4.18 ∓ 2.60, for AD 3.92 ∓ 2.51 and LBD 4.52 ∓ 2.70. The number of medications used increased during the follow-up; at year five the mean for AD was 7.28 ∓ 4.42 and for LBD 8.11 ∓ 5.16. Comorbidity and Neurophysichiatric symtoms scores were significantly higher in the LBD group compared to AD, meanwhile no differences in MMSE. The use of more medications was associated with faster functional decline in AD ( Est 0.04, SE 0.01, p-value 0.003 ) and LBD ( Est 0.08, SE 0.03, p-value 0.008 ) after adjusting by age, sex, comorbidity, Neurophysichiatric symtoms and cognition. For each medication added during the follow-up function decreased by 1% for AD and 2% for LBD.The more medications used, the greater is the functional decline in AD and LBD. Medications in older adults with dementia should be used cautiously.