A preconditioned iterative method for the two-dimensional Helmholtz equation with Robbins boundary conditions is discussed. Using a finite-difference method to discretize the Helmholtz equation leads to a sparse system of equations which is too large to solve directly. The approach taken in this paper is to precondition this linear system with a sine transform based preconditioner and then solve it using the generalized minimum residual method (GMRES). An analytical formula for the eigenvalues of the preconditioned matrix is derived and it is shown that the eigenvalues are clustered around 1 except for some outliers. Numerical results are reported to demonstrate the effectiveness of the proposed method.