Dust particles in a radio-frequency discharge generally obtain a negative charge due to the high mobility of the electrons compared to that of the positive ions. When a sufficiently intense flux of photons in the UV range is present, however, the dust charge will be less negative due to photodetachment. The resulting charge distribution will depend on the competition between collection of electrons and ions from the plasma and the detachment by photons. In this paper we study the influence of photodetachment on the charge of dustparticles suspended in a radio-frequency discharge, as well as its influence on the electron energy distribution function and the electron and ion density profiles. An existing Particle-In-Cell code has been modified to include the photodetachment process.