It is the family Lonchaeidae. Flies from that family are difficult to identify from pictures but the over-all impression is that of Setisquamalonchaea fumosa. No guarantee, though, that it is that species.
I've just googled the fly and it is the same one. Thankyou for your reply. All i have to do now is work out how to deter it from a colleagues dahlias, he's the national dahlia champion and is growing a veriety next year that seems to be a favourite of this fly.
If it is indeed Setisquamalonchaea fumosa, then it might be a case of the onset of decay in plants. The species has been reared from all kinds of decaying vegetable matter (I have seen a long series reared from rotting beetroot leaves). This year I collected many specimens in our museum garden and at the time they were almost exclusively found on stalks of Verbascum that hardly had any flowers left, where seed-formations seemed to be going but where also remnants of petals started to decay and some mould was developing. The adults seemed to be feeding and I did not observe oviposition but that may be because the stalks were actually to dry, I think, for larval development. So, I think decay of plant matter may attract them and, depending on the level of humidity, it will be used for feeding only or for both feeding and oviposition.
In my case the flies were on one of my buddlieas, where the leaves had been eaten by other insects. The seemed to be congregating round the damaged areas of the leaves. In the case of the Dahlias, could it be side shooting that attacts them? It was only one variety of plants that they appeared on.