Capillary action occurs when the adhesion to the walls is stronger than the cohesiveforces between the liquid molecules. The height to which capillary action will take water in a uniform circular tube (picture to left) is limited by surface tension and, of course, gravity.
Hope this helps. :)