This expression is working in that it returns correct results in the query, however, when I try to filter the query say by 'between 5/1/09 and 6/1/09', a syntax error message happens. VH helped me with the expression initially and as I said it does work in the query, as long as I don't try to filter any other information.
This is how the SQL appears in the column heading
SELECT ID, [Completed Date], [Procedure], [Dictating MD], Technologist, Location, [Ordered Date], [Arrived Date], IIf([Completed Date]>[Ordered Date],(24*Int([Completed Date]-[Ordered Date])+Format([Completed Date]-[Ordered Date],'h')) & Format([Completed Date]-[Ordered Date],':nn:ss'),'Order DateTime After Completed') AS [Ordered to Completed HH:MM]
FROM [Critical Value Quality Report tbl];
This is how the SQL appears in the column heading
SELECT ID, [Completed Date], [Procedure], [Dictating MD], Technologist, Location, [Ordered Date], [Arrived Date], IIf([Completed Date]>[Ordered Date],(24*Int([Completed Date]-[Ordered Date])+Format([Completed Date]-[Ordered Date],'h')) & Format([Completed Date]-[Ordered Date],':nn:ss'),'Order DateTime After Completed') AS [Ordered to Completed HH:MM]
FROM [Critical Value Quality Report tbl];