So I saw that there is nothing better than that a man should rejoice in his work, for that is his lot. Who can bring him to see what will be after him?
Solomon is still showing that every thing in this world, without piety and the fear of God, is vanity. Take away religion, and there is nothing valuable among men, nothing for the sake of which a wise man would think it worth while to live in this world.
Commenting on Ecclesiastes 3:16-22
Wherefore I perceive that there is nothing better than that a man should rejoice in his own works,.... The Targum is, "in his good works"; not as justifying him before God, but as vindicating him before men, from unjust censures and charges: rather the sense is, that this is the wise man's conclusion, and this his sentiment, upon the whole; that there is nothing better...
(Compare Ecc 3:12; Ecc 5:18). Inculcating a thankful enjoyment of God's gifts, and a cheerful discharge of man's duties, founded on fear of God; not as the sensualist (Ecc 11:9); not as the anxious money-seeker (Ecc 2:23; Ecc 5:10-17). his portion--in the present life. If it were made his main portion, it would be "vanity" (Ecc 2:1; Luk 16:25).