Education chiefs in Scotland sent a warning to all schools of the potential dangers of such visits and precautionary measures to be taken following advice from the Scottish Office. But visits were not banned.
The DFEE emphasised the need to observe current health and safety regulations and maintain good hygiene standards.
The Health and Safety Executive said farm visits could be a cause for concern as the 0157 strain of the bacteria was particularly virulent. Children could pass it on to relatives if they failed to wash their hands properly.