You will have to change your query with VBA scripting.
Worksheets("sheet_with_table").ListObjects(1).QueryTable.CommandText = "select ROUND(dbo.fn_geteffort(" & Worksheets("status").Range("D5").Value & ", 'Project', 0, 1)/8,2)"
If you want your query to update whenever you change status!D5, post following code in status worksheet event Change
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Me.Range("D5")) Is Nothing Then
Worksheets("sheet_with_table").ListObjects(1).QueryTable.CommandText = "select ROUND(dbo.fn_geteffort(" & Worksheets("status").Range("D5").Value & ", 'Project', 0, 1)/8,2)"
End If
End Sub