A family of Microsoft relational database management systems designed for ease of use.
The following should return a zero if Total Hours is zero:
IIF([Total Hours]>0,[Total Quantity]/[Total Hours], 0)
or to return 'N/A':
IIF([Total Hours]>0,[Total Quantity]/[Total Hours],"N/A")
The former might be better if you need to do any further operations on the value e.g. summation over a set of rows in a report.
PS: The above should work in a query, but not in code.