I need to reference a select case statement in my sql query in access. I used a select case in a public procedure. It compares hours worked to percentage paid. Once this is determined it then compares this rate to the rate currently paid and takes the higher rate. I would like to have this all done in the query because I can't get the totalling to work in a report. How do I refer to the select case that is in my public procedure in a query.