Models of the evolutionary advantages of sex and genetic recombination due to directional selection on a quantitative trait are analysed. The models assume that the trait is controlled by many additive genes. A nor-optimal selection function is used, in which the optimum either moves steadily in one direction, follows an autocorrelated linear Markov process or a random walk, or varies cyclically. The consequences for population mean fitness of a reduction in genetic variance, due to a shift from sexual to asexual reproduction are examined. It is shown that a large reduction in mean fitness can result from such a shift in the case of a steadily moving optimum, under light conditions. The conditions are much more stringent with a cyclical or randomly varying environment, especially if the autocorrelation for a random environment is small. The conditions for spread of a rare modifier affecting the rate of genetic recombination are also examined, and the strength of selection on such a modifier determined. Again, the case of a steadily moving optimum is most favourable for the evolution of increased recombination. The selection pressure on a recombination modifier when a trait is subject to strong truncation selection is calculated, and shown to be large enough to account for observed increases in recombination associated with artificial selection. Theoretical and empirical evidence relevant to evaluating the importance of this model for the evolution of sex and recombination is discussed.