The adsorption of a near-critical fluid confined in a slit pore is investigated by means of density functional theory and by Monte Carlo simulation for a Lennard-Jones fluid. Our work was stimulated by recent experiments for SF_6 adsorbed in a mesoporous glass which showed the striking phenomenon of critical depletion, i.e. the adsorption excess Gamma first increases but then decreases very rapidly to negative values as the bulk critical temperature T_c is approached from above along near-critical isochores. By contrast, our density functional and simulation results, for a range of strongly attractive wall-fluid potentials, show Gamma monotonically increasing and eventually saturating as the temperature is lowered towards T_c along both the critical (rho=rho_c) and sub-critical isochores (rho<rho_c). Such behaviour results from the increasingly slow decay of the density profile away from the walls, into the middle of the slit, as T->T_c. For rho < rho_c we find that in the fluid the effective bulk field, which is negative and which favours desorption, is insufficient to dominate the effects of the surface fields which favour adsorption. We compare this situation with earlier results for the lattice gas model with a constant (negative) bulk field where critical depletion was found. Qualitatively different behaviour of the density profiles and adsorption is found in simulations for intermediate and weakly attractive wall-fluid potentials but in no case do we observe the critical depletion found in experiments. We conclude that the latter cannot be accounted for by a single pore model.