ti basta un IsNumeric
codice:
if request("id")<>"" and isNumeric(request("id")) then
'fai la query
else
'messaggio d'errore
end if