The reaction between acetaldehyde (I), ethyl 3-aminocrotonate (II) and acetoacetate (III) in ethanolic medium yields the corresponding 1,4-dihydropyridine.