Ho scritto:

If Rs_ID("MaxDiCODIDPA")=NULL then
numero = 0
else
numero = cint(Mid(Rs_ID("MaxDiCODIDPA"), 1, 2))
end if

ma ho lo stesso errore e non capisco perchè vada nel ramo else.

Vincenzo