Throw in the ham and fry, stirring, for 1 minute. Add the onion and garlic and cook for another minute, stirring constantly. Add the clams and the sherry, cover with a tight-fitting lid and cook over a high heat for 2 minutes, or until the shells have steamed open.