"select name,cut2,dectime,evnum,order,tempsort,pos,next from hstable where val(evnum)=" & EVV & " order by case cut2 when 'F' then 1 when 'S' then 2 when 'P' then 3 else 4 end asc,next, val(dectime)"
I was wondering what the function VAL does but Google told me that it was MS ACCESS. My knowledge is little about MS ACCESS but it should like something like this:
select name,cut2,dectime,evnum,order,tempsort,pos,next
from hstable where val(evnum)=" & EVV & "
order by
Nz(Switch(
cut2 = 'F', 1,
cut2 = 'S', 2,
cut2 = 'P', 3,
),4) ASC,next, val(dectime)
I use the Nz function to replace NULL and the function Switch. Hopes it helps.