[code]
if record.eof then
cmdavanti.enabled=false
end if
[code]

questa dove la metti dentro??