In May 2002, van der Ham was elected Member of Parliament. He was re-elected in 2003, 2006 and 2010 with
preferential votes. Together with members of
GroenLinks and the
Labour Party he drafted the bill that led to the
2005 European Constitution referendum, the country's first referendum in two hundred years. He drafted several other successful bills, among others: the possibility to correct parliamentary bills by people-initiated referendums, an amendment to put equal rights for gays and persons with disabilities in the Constitution, a bill to abolish the ban on
blasphemy, a bill to reform a ban on shopping on Sundays and a proposal to make the formation process of a new government more transparent. In November 2006, he also became deputy
parliamentary leader of his party. He focused on matters of education,
drug policy, culture, mass media, economic affairs, environment and energy, social equality, democracy, and freedom of speech. In 2007 he wrote a book
Voortrekkers en Baanbrekers ("In the front row") about the role of the Netherlands in the European Union after the European Constitution referendum. In 2012 he published a book "The Morality of Freedom" ("De Vrije Moraal") about the history and dilemmas of permissive societies. ==Out of parliament==