Farmer joined the Queen's Own Cameron Highlanders on 29 March 1892,[1] and served with the 1st Battalion in the Sudan Campaign, 1898, and was present at the battles of Atbara and Khartoum.
Farmer was 23 years old, and a sergeant in the 1st Battalion, the Cameron Highlanders, during the Second Boer War when he won the VC on 13 December 1900 at Nooitgedacht, South Africa.
The enemy, who were hidden by trees, opened fire on the party at a range of about 20 yards, killing two and wounding five, including Lieutenant Sandilands.
[2]He served in South Africa throughout the war, and returned home with other officers and men of the 1st Battalion Cameron Highlanders on the SS Dunera, which arrived at Southampton in October 1902.
His Victoria Cross is displayed at the Regimental Museum of Queens Own Highlanders, Fort George, Inverness-shire, Scotland.