Using free field representation of quantum affine algebra [Formula: see text], we investigate the structure of the Fock modules over [Formula: see text]. The analysis is based on a q-analog of the BRST formalism given by Bernard and Felder in the affine Kac-Moody algebra [Formula: see text]. We give an explicit construction of the singular vectors using the BRST charge. By the same cohomology analysis as the classical case (q=1), we obtain the irreducible highest weight representation space as a non-trivial cohomology group. This enables us to calculate a trace of the q-vertex operators over this space.