Converting Access SQL HAVING command to T-SQL
Create the view without the HAVING clause, and when you query the view, filter it using:

WHERE Guia = ????


...with your "????" being the value that you're passing in from your form.