There is provided a milking system with a milking means, a milk line, and a sampling and analysis device to sample and analyse the milk. The sampling and analysis device comprises a control unit, a tape wound on a tape reel, and comprising a base material with a series of reagent pads arranged to provide a detectable response in the presence of a substance in the sample, a tape mover to move and unwind the tape, a closing device to provide a part of the sample onto one of the reagent pads, and an optical sensor device to detect optical radiation from said reagent pad with said sample, and to analyse the detected optical radiation to provide an indication of a presence or concentration of said substance. The closing device comprises a displaceable nozzle with a supply line for supplying the sample to the nozzle. The nozzle is arranged for supplying the sample upwardly to the reagent pad. The dosing device further comprises a nozzle mover to move the displaceable nozzle towards and away from the tape, and an overflow device, or cup, comprising a wall that surrounds the nozzle. An overflow space is provided between the wall and the nozzle, and further comprises a discharge. The overflow device can collect excess fluid, both when sampling and certainly when flushing. Herein, gravity helps in collecting fluid, but importantly, also in supplying the sample, since the sample droplet cannot break off the nozzle unexpectedly.