To address neural circuits underlying adaptive behaviour, we chose associative memory of Drosophila melanogaster as a model system. Flies form appetitive or aversive memories of an odour by paired presentation of sugar reward or electric shock punishment. Over the past years, we have worked on the neuronal mechanisms that endow positive or negative values with the odour and found the important roles of neuromodulator dopamine. The value signals by dopamine converge with the odour signal in the mushroom body that consists of second-order olfactory interneurons, thereby the fly forms associative memories. Since dopamine is synthesized in ~280 neurons in the fly brain and involved also in other brain functions, it is important to identify individual responsible neurons for reward and punishment. I will summarize our most recent findings particularly how we identified different types of neurons for signalling positive and negative values and discuss about the subcellular modulation of synapses at the formation of odour memories.