In a stock pot, melt the butter over medium heat. Add the onions, carrots, celery and sauté until the onions are translucent. Add the potatoes, corn and thyme and continue to cook for about 5 minutes, stirring often. Sprinkle the flour over the vegetables and stir well, until vegetables are coated and there are no flour pockets, about 1-2 minutes. Add the clam water in a steady stream and stir throughly. Let the soup come to a simmer and thicken, about 20 minutes.
While the soup is thickening, bring 2 cups of water to a boil in a pot over high heat. Add the clams and cover. Cook until clams open, about 7 minutes. Using a slotted spoon, transfer the clams to a cutting board, discarding any that did not open. Save the water to use in the chowder. Remove clams from shells and add to the chowder. Stir in the milk and continue to simmer until the potatoes are tender, about 10-15 minutes. Season with salt and pepper to taste and enjoy!
