The collapse of a trapped boson-fermion mixture with attraction between bosons and fermions is investigated in the framework of the effective Hamiltonian for the Bose system. The properties of an Rb-87 and K-40 mixture are analyzed quantitatively at T=0. We find numerically solutions of the modified Gross-Pitaevskii equation which continuously go from the stable to the unstable branch. We discuss how the conditions for the onset of collapse are related to the macroscopic properties of the system. A comparison with the case of a Bose condensate of the atomic Li-7 system is given.