An image forming apparatus comprising: a recording head to eject droplets of liquids; a plurality of head tanks to supply the liquids to the recording head; a plurality of replaceable main tanks to store the liquids to be supplied to the recording head; a plurality of liquid feed pumps to feed the liquids from the plurality of main tanks to the plurality of head tanks and in reverse from the plurality of head tanks to the plurality of main tanks; a first driving source to drive the plurality of liquid feed pumps; a first shaft connected to the first driving source to be rotated by the first driving source; and a drive switching assembly to selectively transmit a driving force of the first driving source to the plurality of liquid feed pumps, the drive switching assembly including a second driving source; a second shaft connected to the second driving source to be rotated by the second driving source; and characterized by further comprising: a cam (103, 108) provided on the second shaft and rotated by the second driving source, a slider member comprising an engagement portion that engages with a cam groove of the cam (103, 108) so as to be movable in an axial direction of the second shaft with rotation of the cam (103, 108), and a switching gear configured to engage with a gear rotated by the first driving source thereby to receive the driving force of the first driving source and rotatably mounted on the slider member so as to move with the slider member when the slider member is moved by rotation of the cam between positions to engage driving gears of the plurality of liquid feed pumps and a position to disengage from the driving gears of the plurality of liquid feed pumps, whereby the driving force of the first driving source can be selectively transmitted to the plurality of liquid feed pumps. a recording head to eject droplets of liquids; a plurality of head tanks to supply the liquids to the recording head; a plurality of replaceable main tanks to store the liquids to be supplied to the recording head; a plurality of liquid feed pumps to feed the liquids from the plurality of main tanks to the plurality of head tanks and in reverse from the plurality of head tanks to the plurality of main tanks; a first driving source to drive the plurality of liquid feed pumps; a first shaft connected to the first driving source to be rotated by the first driving source; and a drive switching assembly to selectively transmit a driving force of the first driving source to the plurality of liquid feed pumps, the drive switching assembly including a second driving source; a second shaft connected to the second driving source to be rotated by the second driving source; and characterized by further comprising: a cam (103, 108) provided on the second shaft and rotated by the second driving source, a slider member comprising an engagement portion that engages with a cam groove of the cam (103, 108) so as to be movable in an axial direction of the second shaft with rotation of the cam (103, 108), and a switching gear configured to engage with a gear rotated by the first driving source thereby to receive the driving force of the first driving source and rotatably mounted on the slider member so as to move with the slider member when the slider member is moved by rotation of the cam between positions to engage driving gears of the plurality of liquid feed pumps and a position to disengage from the driving gears of the plurality of liquid feed pumps, whereby the driving force of the first driving source can be selectively transmitted to the plurality of liquid feed pumps. a cam (103, 108) provided on the second shaft and rotated by the second driving source, a slider member comprising an engagement portion that engages with a cam groove of the cam (103, 108) so as to be movable in an axial direction of the second shaft with rotation of the cam (103, 108), and a switching gear configured to engage with a gear rotated by the first driving source thereby to receive the driving force of the first driving source and rotatably mounted on the slider member so as to move with the slider member when the slider member is moved by rotation of the cam between positions to engage driving gears of the plurality of liquid feed pumps and a position to disengage from the driving gears of the plurality of liquid feed pumps, whereby the driving force of the first driving source can be selectively transmitted to the plurality of liquid feed pumps.